It is my understanding that science has proven that if a person has only two X chromosomes, that person is female.
If a person has only an X and a Y chromosome, that person is male.
If a person has two X chromosomes and a Y chromosome, that person will be male, have Klinefelter's Syndrome and be sterile.
Surgery to change the look of the body will not change the sex of the body.
God makes short people and tall people. He makes some without arms and legs (lifewithoutlimbs.org), some blind from birth (John 9), others with Downs Syndrome, and others with more or less intelligence.
All of us, however God made us, are responsible to Him to glorify Him with the lives He has given us. Usually that means accepting the way God has made us, tall or short, healthy or ill, smart or not so, or male or female.
Undergoing operations to change the appearance of ones sex does not change ones sex. Our sex is written in every cell of our body.
This is the way God designed us before the creation of the world. We should learn how to glorify God with the bodies He has given us, like Nick Vujicic (lifewithoutlimbs.org) who was born with no arms or legs, instead of charging God with making a mistake in our birth.
Unfortunately, this only applies to those who accept that there is a creator God who made them as they are. The rest of the world are not likely able to be reasoned with regarding this. So, what can you do?