You could try to make an ungoof-mode. Of course it'll only work if you don't just disable it.
A seperate account where you don't have file access rights to study unrelated media and youtube / chans are redirected to an offline page that says "you should be studying"?
In the end it's just tools to change your habits.
But tools can help.
I think the most important thing is that you must realize that it is hard to change a habit. You will have to make a mindful decision every day that you will try to keep at it. You have to catch yourself when you start up a movie / open up a site instead of studying. Every time. It will take time before the new pattern is the automatic one.
I hope you make it, because I'm the same way, but I procastrinated to fix my procastrination too long and I did break my chances and became a NEET a while instead, still in the process of picking up the pieces and save what I can.
It kinda boils down to that it's up to you, your willpower, and how much you are prepared to fight for the wellbeing of your future self.
(and how much less you valued your future choice of career vs. another ep. of Boku no Pico)Post too long. Click here to view the full text.