Unfortunately, Doduo does not have the Egg Move Drill Peck, and so he can't learn it when it's hatched out of the egg.
How it works is that the Female's first evolution must have the egg move of whatever move it's trying to learn. In this case, it's Drill Peck. Since Doduo doesn't have the egg move of Drill Peck, it can't learn it. The male is the one that possesses the move.
Hope I helped. :)