I'm going through that process as well, as I switch my projects away from coding and back to academic reading and research, which I have not done in 30 years.
What is working for me is to take it slow. To get actual books, not e-books, sit down with them in a cozy reading corner I set up, and read what I can. To go to libraries, browse the stacks, take a few books to a table, and skim through them. Basically, to avoid middle grounds and go all the way back to how I used to read before the web took off. It is not fixing my attention overnight, but I am improving over time.
It also helps to have a focus. Reading for its own sake doesn't give me the endurance I used to have, but deliberate reading to further some research goals helps me get more done.
What is working for me is to take it slow. To get actual books, not e-books, sit down with them in a cozy reading corner I set up, and read what I can. To go to libraries, browse the stacks, take a few books to a table, and skim through them. Basically, to avoid middle grounds and go all the way back to how I used to read before the web took off. It is not fixing my attention overnight, but I am improving over time.
It also helps to have a focus. Reading for its own sake doesn't give me the endurance I used to have, but deliberate reading to further some research goals helps me get more done.