Firstly, Marriage is the Islamic way for making relationship between males and females legal. It is also an act of sunnahIbn Mas`ud reported that the Prophet (peace and blessings be upon him) said: “O young men, whoever among you is able (to marry), let him get married. Whoever is not able to, let him fast, for it will be a shield for him.” (Al-Bukhari and Muslim)

The Prophet urges us to marry because it is the Islamic way that makes relationship between man and woman lawful. Taking girlfriends, even with the intention of marriage, is not allowed in Islam.

There could be some arrangements to marry a lady, but a man should keep patient and should not have anything with her except to go to her family for marriage related issues such as pre-marriage arrangement, etc. 

Dr. Muzammil Siddiqi, former president of the Islamic Society of North America (ISNA) states:

In Islam, it is not allowed to take a non-mahram woman as a very close friend. Such friendship often leads to haram. In the Qur’an, Allah mentioned that good men and women are those who marry, do not have fornicating relationships and do not have “paramours” or Akhdan see An-Nisaa’: 25, Al-Ma’idah: 5).
Akhdan are “sweethearts” or for a man a “mistress” and for a woman a “lover”. The Prophet, peace and blessings be upon him, is reported to have said that “whenever two strangers of the opposite gender are alone with each other, Satan becomes the third of them.” (At-Tirmidhi)”

So, it is not allowed for a Muslim young man to have a girlfriend or for a Muslim girl to have a boyfriend. Therefore, howsoever pure the intention may be, the danger is that such relationship will lead  to sin. 

It is allowed for a Muslim student to be friendly with his classmates irrespective of their gender, but it is unlawful to take a girl as his intimate friend.

In an environment where homosexuality is rampant, It will also be forbidden for people of the same sex to have intimate friendship among each other in the “gay sense” of the word.”

May Allah guide all of us to what pleases Him