I think I was telling people I wanted to be a boy until around 9-10. What I really wanted was to utterly reject the soft, pink uniformity that I felt was coming at me from every direction and I didn't know how else to do it.
All the virtues and strengths I admired or aspired to seemed to have been co-opted by history and culture as masculine or male (rationality and evidence-focus, abstract thinking, coolness in difficult situations etc..). Most of the main characters in books and films back then seemed to be male or very soppy females, certainly no one I felt able to identify with.
Years later, I watched the film "Iron Jawed Angels" (which I didn't think was that good) and a quote from the Hilary Swank character stuck with me:
"You ask me to explain myself. I'm just wondering, what needs to be explained? It should be very clear. Look into your own heart—I swear to you, mine is no different. You want a place in a trades and professions where you can earn your bread; so do I. You want the means of self-expression, some way to satisfy your own personal ambitions; so do I. You want a voice in the government under which you live; so do I. What is there to explain?"
I never really wanted to be male. I just wanted all the things that seemed automatically accessible and open to boys and not the dumbed-down and pinkified version.
I'm sure some people really do want to be the opposite sex but for many of us it's a childhood phase driven by different psychological motives.