This topic has been discussed a lot on the forum, see for example:
- The meaning of paṇḍaka in light of the Vedic and Jain scriptures
- What is the 'legal' thing to do here (about transgender going forth)?
- Through the Yellow Gate: Ordination of Gender-Nonconforming People in the Buddhist Vinaya
- Becoming Jivaka - the story of the first transgender monk
Just to note a few threads.