All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
First, we thank Allah, The Almighty, for guiding you to be committed to His Religion and saving you from falling in the sin of adultery and fornication. We also ask Him to help you and us hold fast to His Path and purify our hearts and guard our private parts against perversion, hidden and apparent.
Know, dear brother, that homosexuality is among the great sins. It is the most serious evils innovated by the People of Lot whom Allah, The Almighty described in the Quran as ignorant, deviant, criminal, and ill natured. Allah destroyed them and made of them an example for others. Allah Says (what means): {Indeed, we will bring down on the people of this city punishment from the sky because they have been defiantly disobedient. And We have certainly left of it a sign as clear evidence for a people who use reason.} [Quran 29:34-35]
So, he who is wise takes lesson from others and the ignorant is he who makes of himself a lesson for others.
Homosexuality involves destructive diseases and consequences so much so that it became discernable to every one of sound mind. Thus, dear brother, beware and keep yourself away from responding to the calls of the evil-inspiring self and the cursed Satan who tries his best to entrap man to fall in sin and scandal in this life and in the Hereafter. Keep away from attractive boys and from gazing at them.
Allah, The Almighty does not blame you for mere imagining committing homosexuality, but He does hold you accountable for intending and trying to do so. It is because of His Mercy for the Muslim Nation that He does not hold us accountable for anything unless we say it or do it. Yet, determination and intention to do it is equivalent to doing it in terms of incurring sins. But mere imagination is pardonable.
As for your question whether a genie confounds you and lures you, yes Satan and his soldiers are always there to entrap you and incite you to commit sins, as stated earlier. So, beware of that.
For more benefit about the prohibition of homosexuality, please refer to Fataawa 82048, 89290, 92704 and 81617.
Allah knows best.