Distractions are often contributed to the external environment: text message, phone calls, chatty people, stimulating spaces, being needed by others, etc.
These "distractions," more often than not, confirm the reality of one's internal environment: anxiety, disbelief, unworthiness, fear, guilt, etc.
If you're anticipating failure in advance (anxiety), unconsciously, you'll create the environment above to support your emotional reality.
Once you understand the mechanics of what's actually happening and can discern because cause, compensation and symptom, you can get some work done.
"Our hearts cannot rest until they rest inside of Love." Pope Francis