There are lots of techniques that can be helpful.
Sometimes it's a matter of very small things: when you get distracted by something on the computer, it can happen in a fraction of a second and involve very little effort or thought or energy. Turning that little action in a different direction can be like turning the course of a tiny trickle of water which can eventually grow into a huge river, down one side of the mountain rather than the other.
I had something I wanted to spend more time on when I use the computer at home. I made myself a rule that I have to do a bit of work on it every time I use the computer. I also positioned the window for that application at the edge of the computer screen so that there's always a little bit of it showing peeking out from behind the edge of my browser which I have sized to not quite fill the whole screen. When I start up the computer, one application might start up a few seconds before another, and those few seconds can contribute to what I end up spending time on. Being able to see it makes it much easier to remember to switch tasks. Little things can make a big difference.
You could set a timer, maybe every 10 or 30 minutes, and when it goes off stand up, stretch and ask yourself "what am I working on? Am I doing what I want to be doing?" You might try the Pomodoro technique.
Don't be hard on yourself. Do reward yourself for doing small amounts of work, or for doing a little better than the day before.
You could make rules for yourself. Sometimes it's good not to make them too strict: leave room for playing, too. On the other hand, sometimes staying off distracting computer stuff completely is easier than letting yourself do a bit of it and trying to limit it.
You could aim to spend half an hour only on the thesis, then have a reward (e.g. something nice to eat), then after that do other stuff on the computer.
You could use one computer in one room only for your thesis, and a different computer in a different room (or the same computer, moved to a different room or turned around in a different direction) for everything else.
You could have an alarm go off at random times, and give yourself a reward if you're working on the thesis when the alarm goes off. (A very quick little reward, then back to the thesis; the reward could be opening a book to look at a beautiful picture, or turning over a rainmaker to make a nice sound. If you've chosen it as a reward, it feels like a reward.)
"Eat that frog!" is a book that can help with overcoming procrastination. Other good books include "Willpower" by Baumeister and Tierney (but the first half can be a bit discouraging), and "The Power of Habit" by Charles DuHigg.
Inability is an abstract thing involving comparison with alternate universes; it cannot be experienced.