Demetrius Jermaine Miller attacked the 27-year-old who was born female but is in the transition of becoming male in May this year.
Shereen Askalani, prosecutor at the trial said that Miller had accepted marijuana from the victim and then went with them into a nearby alley before beating the man and robbing him.
It was stated that when he discovered the victim was biologically female, he then raped the victim.
Prosecutor Mr Askalani said the victim’s personality has changed since the attack, and he is now living in fear.
Mr Miller fired his attorneys during the proceedings claiming they were ineffective.