It is still a sin, even if you don't act on the urge.
“It is still a sin, even if you don’t act on the urge.”
An inclination is not a sin. Dwelling in your mind on acting on that inclination or actually acting on that inclination is what is sinful.