You may seem being experiencing the effects of hormonal changes if you haven't already in your early teens. Nonetheless, please refer to the below Hadith
Narrated `Abdullah:
We were with the Prophet (ﷺ) while we were young and had no wealth
whatever. So Allah's Messenger (ﷺ) said, "O young people! Whoever
among you can marry, should marry, because it helps him lower his
gaze and guard his modesty (i.e. his private parts from committing
illegal sexual intercourse etc.), and whoever is not able to marry,
should fast, as fasting diminishes his sexual power."
Sahih al-Bukhari 5066
The Prophet(ﷺ) gave clear instructions that after reaching puberty, if one is able to marry (is both emotionally and financially capable to supporting a family) then he should go ahead and marry.
Alternately, he should keep fasts as it reduces his strength and guards his spirit. I have come across a few young people in the west who are exposed to a lot of fitna and choose to fast atleast twice a week. This helps them follow the sunnah and also guard their imaan.
I'd also recommend you to surround yourself with good friends who are good at studies and stay away from vices. Both bad company and staying alone helps shaytan gain control over desires whereas good company helps us not get distracted.
Best of luck and may Allah make it easy for you.