Srimad Bhagavatam Canto 09, Chapter 01, Text 33

SB 9.1.33

tata urdhvam vanam tad vai
 purusa varjayanti hi
sa canucara-samyukta
 vicacara vanad vanam
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Since that time, no male had entered that forest. But now King Sudyumna, having been transformed into a female, began to walk with his associates from one forest to another.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
In Bhagavad-gita (2.22) it is said:
 
vasamsi jirnani yatha vihaya
 navani grhnati naro ’parani
tatha sarirani vihaya jirnany
 anyani samyati navani dehi
 
“As a person puts on new garments, giving up old ones, the soul accepts new material bodies, giving up the old and useless ones.”
 
The body is just like a dress, and here this is proved. Sudyumna and his associates were all male, which means that their souls were covered by male dress, but now they became female, which means that their dress was changed. The soul, however, remains the same. It is said that by modern medical treatment a male can be transformed into a female, and a female into a male. The body, however, has no connection with the soul. The body can be changed, either in this life or the next. Therefore, one who has knowledge of the soul and how the soul transmigrates from one body to another does not pay attention to the body, which is nothing but a covering dress. Panditah sama-darsinah. Such a person sees the soul, which is part and parcel of the Supreme Lord. Therefore he is a sama-darsi, a learned person.
Srimad Bhagavatam Canto 09, Chapter 01, Text 32
Srimad Bhagavatam Canto 09, Chapter 01, Text 34