Written Torah prohibits any modifications to a penis (Deuteronomy 23:1) so there is absolutely no justification for sex change.
All forms of sexual deviances is a direct violation of the 7th commandment. Also, if such person did a sex change, who would he sleep with? It clearly prohibits for male to sleep with another male (regardless if he had sex change or not). Its Leviticus 18:22 and 20:13.
A better question would be if someone was born with a penile anomaly and it got fixed by means of stem cells (meaning completely), would such person be eligible entering back the assembly?
Sex change makes you a non-Jew, so non-Jews can do sex change. But Jews should never approve or encourage non-Jews to do it.