How does this work?

If I am 20 and identify as a female (after being born male), why am I female? Am I female only because I identify as female? Why can I not identify as a certain age? If I'm 5 and identify as 20, why can't I work in the u.s. army? If I'm Hispanic, why am I not white? A simple checkup can prove my identity wrong.

I'm not trying to be rude, but I'm genuinely curious as to how this identity thing works...