I remember when my son was two. I had left one of my prettier shirts on the floor. My son put it on and declared "I'm a princess". I thought it was adorable and didn't read anything into it. Today he is still very much a boy.
His interest in princesses was in no way a reflection of "gender". He merely had had a fair amount of exposure to Disney princess stuff, and at the time liked it. Boys can like girly stuff and still be boys.
Gender isn't even important unless we make it so. People can like and behave however they like, regardless of gender. There are only two aspects of our life where gender should come into play: romantic/sexual relationships (in which case your partners interpretation of you gender is just as important as your own), and medical situations (and what your body does dictates that, not how you feel).
At three, gender should be irrelevant. Girls can play with trucks and boys can play with dolls and it doesn't change their gender. It shouldn't even occur to a child that young that they are the "wrong gender" unless the adults around them are already imposing stereotypical gender roles onto them.