All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Guarding one’s chastity means not committing fornication. Shaykh Al-Islam Ibn Taymiyyah wrote: “Allaah, The Exalted, says (what means): {…the men who guard their private parts and the women who do so…} [Quran 33:35] Guarding one’s private parts means preserving one’s chastity by adhering to the limits of Allaah and keeping away from all which is unlawful.” [Majmoo‘ Al-Fataawa]
It is hoped that this Hadeeth applies to the person who committed fornication or homosexuality and repented of his sin. It has been authentically reported that the Prophet, sallallaahu ‘alayhi wa sallam, said: “He who repents of his sin is like one who did not sin.” [Ibn Maajah - Al-Albaani graded it Saheeh (sound)]
Moreover, it is well-known that a Muslim will ultimately be admitted to Paradise even if he is punished first in Hellfire for the sins which he did not repent during his life. Muslims will not remain in the Fire eternally.
For more benefit, please refer to Fataawa 88137, 86547 and 86527.
Allaah Knows best.