I'm familiar with this. There's no magic solution, sadly, but I'll share one thing that has helped me and may apply at least to some of your situations. I realised a while ago that my main issue was with nebulous tasks -- that is, the more concrete, defined, and _meetable_ a task was, the less trouble I had with it. So I started to break down large tasks, which never got started much less finished, into smaller ones,…
Another aspect that is also useful has been my experience of Pomodoro technique. At a job where we were practicing Pomodoro technique, I realized I don’t struggle with concentration anymore. The minimalistic explanation of the technique is to work on a task inside 45 minute intervals; then walk away from the computer for several minutes.