You can't unhook your imagination, but you can develop focusing skills. I say "develop" because it takes training. I would always lose my place when reading, then I realized that I was allowing myself to be distracted. I can't read and absorb what I am reading because my ears gravitate toward voices and external sounds. The voice always wins, and I haven't a clue what I was reading because I was going through the motions without focusing on the messages. My enemy is external noise.
When needed, concentrate on the message being given - verbal instructions, written instructions, and internal "in your head" problem-solving discussions. Give all of your energy to the message. When you stray, pull back and connect with the message again. Keep your eyes on the speaker, or the text, and focus exclusively on understanding the message. You have a natural tendency to let your mind wander. That's a habit you have become accustomed to. Use your mind like a grip. Try to keep your mouth shut - no comments. Also, don't critique the message - listen for meaning only, and read for meaning only. If you have to read something more than once, read it more than once. This is training and practice. You are exercising focusing skills, so you must ignore anything that is not the message. This is my own method, not anything from a medical professional. The problem is all about combatting the external influences that command your attention and draw you away from focusing. I had to learn about all the things that draw my attention away. I was able to learn to tune them out by keeping all effort on the message. Even my unconscious body movement are a distraction. You eventually learn how to maintain focus without interference.