The Bible isn't a book of myths. The birth narrative is just one example where what tradition says isn't what the Bible says.
Herod ordered the deaths of all the boys two years and under in Bethlehem and its vicinity. So it makes sense that Jesus was two years or under at that time.