If your genetic gender was female (XX) then you are a female. If your genetic gender was male (XY) then you are a male even if you have gone through surgeries to look like a female. If your genetic gender is male (XY), you should avoid looking at females without Hijab because you are a male.
Wassalam.