No, as everyone's said, it's not at all about sex.
However, I think the thought of sex can help you realise you're trans, so-to-speak. Like, given that I'm physically female, the fact that, whenever I imagine being with a man, I myself am always male and have been for years, made me question if there was something wrong, that I wasn't a 'normal' girl. However, while it was one of the reasons that led me to start questioning myself, it was not the only reason, and certainly not why I want to transition. Of course I would like (gay) sex to happen one day, but even if I knew before I definitively decided to transition that it wouldn't happen, I would still go for it. I want to be able to walk my dog, go to work, have coffee with friends, and watch movies with my Mum as the man I am, and so whether I die a virgin or have a wild gay roll in the hay every night from the moment I start passing is irrelevant.