Have a look at the runner's world website. they have some training programs which help to buildup your distance and have training programs for complete beginners and experts.
When are you doing it and which one are you planning to do? Make sure its a flat course unless you are training on hills. REmember, you don't have to run the whole thing, can do a run, walk, run, walk.