Hi,
You have to understand that out thoughts are like a running river, it does not stop and cannot be stopped completely.
We can only try to hold our attention and concentration on a particular issue as far as possible.
It depends on how determined are you in your studies.
Since your current problem is with attention, concentration and memory, you need counselling regarding how to improve your concentration and memory.
Regards
Next Steps
Consult Psychiatrist