Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- You are required, as a Muslim, to make good relations with all people regardless of their religion or background as long as they do not impact your faith.
2- However, you should be careful about that friend in order not to influence you negatively.
Responding to your question, Dr. Muhammad Salama, PhD, Islamic Studies in English, Associate Professor at the Faculty of Islamic Sciences al-Madinah International University (Mediu), states:
Islam urges its followers to be careful when choosing a friend, for friends usually copy each other. The Prophet (peace and blessings be upon him) said, “Man follows his friend’s religion. So, each of you should be careful who he takes for friends.” (At-Tirmidhi and Abu Dawud)
He also said, “Do not accompany but a believer and let only pious persons eat your food.” (At-Tirmidhi and Abu Dawud)
As for non-Muslims, one may have good relations with them as long as they do not take antagonistic positions against Islam and Muslims with the intention of advising them and attempting to guide them to Islam.
The Prophet (peace be upon him) said, “By Allah, if a single person is guided by Allah through you, this will be better for you than a whole lot of red camels.” (Al Bukhari and Muslim)
Accordingly, you have to be careful in your relation with this person and never regard him as an associate friend. Only take the opportunity of having a relation with him to call him to accept Islam, for when he accepts Islam, he will quit homosexuality.
If you feel you cannot do this or you have tried but he refused, then I advise you to end your relationship with him lest this relationship might leave evil impact on you.
Allah Almighty knows best.