Aran'gar (as Cannoli points out) isn't a transgender character in any deeper sense.
If anything their story arc is the process of in reverse. The character starts out "in the right body" and is then placed in one that they are completely uncomfortable with (to begin with).
The "punishment" in this case is the body/gender dysphoria that is the cause of many people to want to transition in the first place. I don't have especially great memory of Aran'gar and their thoughts about being dumped in a different body, so they might not be especially analogous to gender dysphoria (Cannoli, who undoubtedly has a better memory of the text than I do doesn't seem to think so) but that's certainly the more logical angle as far as I see it. Although given when it was written anything that is there is likely coincidental. If I was to hazard a guess I'd say it was more a exploration of RJ's kinks than anything else.
I'm Israel, he's Palestine, its more fun when you pick sides.