In your case we need some more details to come to a conclusion like what kind of thoughts come in to your mind, for how long , whether you are worrying about a particular thing or unnecessary thoughts come to your mind which distracts you
Thoughts are bad or good depending on how you see it . Don't label any thought as bad or good just try to neglect if it's not needed at that point of time
At times getting distracted when you sit for long hours is common
If thoughts come in between you can write it in a dairy n come back n think about it after you finish studying
Next Steps
Take short breaks while reading