SB 9.1.33

tata ūrdhvaṁ vanaṁ tad vai
 puruṣā varjayanti hi
sā cānucara-saṁyuktā
 vicacāra vanād vanam
Word for word: 
tataḥ ūrdhvam — from that time onward; vanam — forest; tat — that; vai — in particular; puruṣāḥ — males; varjayanti — do not enter; hi — indeed; — Sudyumna in the form of a woman; ca — also; anucara-saṁyuktā — accompanied by his companions; vicacāra — walked; vanāt vanam — within the forest from one place to another.
Translation: 
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: 

In Bhagavad-gītā (2.22) it is said:

vāsāṁsi jīrṇāni yathā vihāya
 navāni gṛhṇāti naro ’parāṇi
tathā sarīrāṇi vihāya jīrṇāny
 anyāni saṁyāti navāni dehī

“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. Paṇḍitāḥ sama-darśinaḥ. Such a person sees the soul, which is part and parcel of the Supreme Lord. Therefore he is a sama-darśī, a learned person.