I’ve never been diagnosed but I had trouble focusing on anything that wasn’t sports or any activity that was highly stimulating.
Your goal should be getting into a ‘flow’ state. Like many commenters before me, headphones, spotify and in a place without distractions. Start by reading a piece of code, go through it step by step until it makes sense. Keep doing this until you’re ready to work. Now you want to define a task, continue working until you lose your ‘flow’ state. Take a break, stand up and stretch. Now go back your work station and repeat that process. After 3 weeks of building this muscle you should see significant results.
Best of luck.