بسم الله الرحمن الرحيم
My dear brother,
We can divide your question in to two parts:
1) Masturbation: Is it allowed and how to overcome the urge to do so.
Masturbation, as you are aware, not allowed in Islam. It is *self* stimulation, usually to the point of ejactulation. The act is harmful to you both spiritually and physically and committing the act of masturbation is committing a sin that has been commanded against. There is no circumstance in which masturbation is allowed in Islam. See https://www.sistani.org/english/qa/01244/ which also has other similar questions.
In order to control these urges, the following two recommendations are from the book "Jami'i Al Sa'adat - Al Naraqi":
2. Blocking all paths that lead to potential urges.
With regards to hunger - never eat to your fill, for over eating is "Israaf", and eating to your fill is against the recommendations of the Ahlul Bayet. What you eat is also a concern. Western style foods such as fast food and soft drinks high in sugars and salts, energy drinks and the like all contribute to desires being fired up and causing urges. Spices, caffeine and chocolate are another source. Fasting can be very helpful (remember not to undo your work by binging after sunset!).
Paths that lead to urges include imagination, looking at the opposite gender, speaking with the opposite gender, having spare time, being alone and similar things. Each can be discussed at length, but for example, if you can fill your time table with programs, always be in the company of someone, never having your mobile phone near you while asleep or when alone (at least not while its connected to the internet), being careful what television shows or movies you watch can all contribute to a healthier more spiritual mind.
The most important and effective method of breaking this habit and preventing this urge is.... marriage!
Marriage is difficult in the current climate due to multiple factors including studying and finding a suitable person. The community also has made it taboo in some countries to have a "temporary marriage", for example, and so we fall in to it being OK to do haraam as long as we dont do the taboo! Considering this taboo, we need to consider the items you have identified as preventers:
a) Studying: While important, is not a reason not to get married. Marriage protects half the religion. It gives you responsibilities such as having to provide, caring for the family, increased patience, and is a form of struggle. These, along with the fact you find comfort in your wife, will redirect your energy away from sin and in to more important and real issues. It will also help you study as you find a new drive and goal.
b) Finding the right person: Insha-Allah you will, soon.