Seems like your head's in the right place these days, OP. Like one of the earlier posters I think mentioned, just treat it with the seriousness you'd treat a job, and you'll make it through.
I had similar discipline issues coming out of high school (didn't take it seriously, ditched and got into trouble all the time, almost flunked out, went to independent study, half-assed it and coasted hard, graduated, but literally never learned or ever tried anything) that ended up kind of scaring me out of going to college. In fact, one of the big reasons I never really considered it even years after high school was I just assumed I was an idiot, haha. Fast forward to a year or so back, and my wife starts going back to school, and I help her go over some of her homework and kind of realize, oh shit, this all seems suuuuuper manageable. Now, at the same age as you, I'm planning on starting down that very same degree path that you're starting down.
So I guess the dumb point I'm taking a long time to make is: I think effort is the biggest ingredient, and it seems like you're ready to give it that now. You'll crush it, OP.