6 months. Many renowned coaches speak of this. Broken down the six months are:
3 months base build. get up to 60-90 minutes daily, 90 minutes 1-2 times a week, 120 minutes once a week. In the 3rd month add in a fartlek once a week of something like 1 minute on, 1 minute jog 10-15 times and one day of 30-40 minutes steady pace. Start this tempo at easy pace minus 15 seconds. Make sure to get in the warm up and cool down.
1 month transition to harder work. Get in some 10K or 5K reps. Nothing crazy, but this should alter the fartlek day to specificity. Add in some doubles before the workouts.
2 months race work. This is when you are ready to train hard. Peak is at the end.