It sounds very much like the sort of thing he may have heard at school. Most likely, someone with an older sibling has been told something and passed it on incorrectly. Find out where he learnt the phrase - if it's endemic at school, it may be very difficult to correct his error without enlisting the school's assistance to point out the error.
I think you simply need to correct his terminology - if he points at his penis and calls it a vagina, he's simply got it wrong! Find out his general opinions on his gender. At five, he should be able to tell you if he likes being a boy or not, and that should give you an idea of whether it is a matter you should be concerned about. In my (admittedly limited) experience, this kind of thing is pretty common, and will pass.