I went trough a very similar expirience. I smoked all trough highschool, my grades were always the minimum required to pass. In my country getting into college is mostly determinated by a uniformed exam at the end of highschool. Long story short i am now in a very good mechanical engineering faculty, my grade average isnt perfect but it's by far in the better half of the people in my year, most of whom had straight A's through high school. The fact is it can be done and you can do it. Quitting weed cold turkey for about 6 months was critical for me to succeed. Now I smoke from time to time witouth it affecting my work by a substantial amount. Filing your head with self help stuff regularly is great, it will put you in a good place considering addiction and bad working habbits. Don't watch Leo's videos all day either, studying is your priority. The book think and grow rich was also very helpful, read it and aply as much as you can. The book gets silly from time to time but it really works. Its from a different time. Quitting weed will Bring other good things. Brain chemistry will recover(after time) and you will expirience spontaneous joy. Thats the best part of not smoking for me. I forgot that can even happen for how long i have been smoking. And it does pay off. I am 20, and i wasnt this happy since i was a child.
Best of luck and sorry for poor spelling.
Also message me if you want to ask me something.