The surgery is not a required part of transition. Some have it, some don't.
The thing is that gender, sexuality, and "equipment" are 3 distinct and separate things. Most of the time they all line up in the traditional way and for those of us who have that make-up it's is impossible to know how it feels when they don't, let alone when those realizations occur.