While I was doing my Masters, I would spend the morning at the gym, and all of the afternoon working.
Do not underestimate:
- telling yourself, in a genuine fashion, that you are now going to work without distraction
- telling yourself you are going to read 50 pages or for one hour solidly before taking a break (this can be adapted to other tasks)
- recognising that your mind has strayed and you are that you are thinking of something else, identifying what it is you are thinking of, writing that thought down for analysis later on, and then returning to your work