While the other comments are useful (either use more technology or self control) I don’t have think they really address the actual problem. Whenever I find myself doing this it’s always because I am avoiding something (either doing something or thinking about something). Find out what those things are, and deal with them.
That's up there with "just be more happy" (for depression), "just exercise," "just eat less food" (for obesity) in terms of being entirely unconstructive.
Yes, chronic procrastination is an avoidance technique but "just do it" isn't actually an effective strategy to overcoming it.
Here's a video that people suffering from this may actually find helpful:
It offers actionable advice and strategies.