I definitely did not know until recently, this past year or so. To be honest, I think a lot of my reason for not knowing is attached to the fact... I had other things that were blowing up in my face that I needed to focus on.
My mother was a raging alcoholic and my father is an immature man who acts like an 8 year old boy, spitballs and all. My mom would take out her feelings - anger, depression, violence - on me, and my dad did nothing to help me. I took on the role of the adult of the family in order to protect my brother. My mother died when I was 16 and my dad promptly got in a relationship with another incredibly abusive woman who stalked and threatened me over the cell phone (god knows how she got my number!) Thanks to this... I had other things in my mind. I also have severe anxiety disorders and depression, likely a cause of my childhood issues, but these left me stressed to the point of minor hallucination.
Thanks to this, I had to... get out of that situation to actually start understanding myself. I didn't figure out I was asexual, had anxiety/depression issues that NEEDED treatment to help my suicidal thoughts, and that I am a transman until a good year after I left my hometown to pursue my own career path.
Looking back, there was definitely some signs! No wonder I was never very happy with the way I looked and uncomfortable with puberty and my chest and just assuming it was cuz I was 'ugly' or something... haha. Had other things that were most important to me at the time, I guess! But I feel so much more in my skin now that I am looking at myself more objectively this year.