what worked for me training for my first marathon (and may not work for you) was running a steady pace for 10kms. It's ok to walk whenever you need to. Take a break and keep moving, then pick the pace back up and run until you need to walk again. Don't run at a fast pace, just a moderate pace.
This will build your endurance and stamina and let you get used to being on your feet for a longer time - like an hour or so.
Then try to cut back on the amount of time you spend walking until you can run the 10km non-stop.
Then.... the scary bit happens. go for a really really long run. As far as you think you can go. Again it's ok to walk bits of it. but try to be on your feet for more than three or four hours.
Then have a light week to recover, and then go back to the 10km run. you should see a really big improvement in your time and comfort running that distance.
Then you just rinse and repeat using longer base distances. e.g. the next bracket using 15kms as a base distance.
I found that i actually skipped the 15km bracket and went straight to the 20km one. Then 30km 3 times a week. (then I thought this is a bit silly, you'll kill yourself. So I dialed it back a bit)
For pretty much all of this running, you don't have to do it fast. just take your time and work on being as relaxed as possible while you are running. The speed will come with the endurance and the experience. so don't worry too much about that right now.
Disclaimer - I've come last or second to last in every race I've been in. So take my advice with a grain of salt ;-)
It obviously works for you. I'm going to have to face the longer distances. This race is only about double what I usually run, so it feels achievable.
it sure is. And you have three months to train for it.
you are doing 5km now no problem, so next week bump that up to 10km - with walking as needed, and do that for a month. don't try to go further than that for the first month and see how you get on.
the first week will be hard. the second week will be just as hard, the third week will seem a bit easier and by the fourth week you'll be looking for some more challenge. And that's when you step it up another 5kms.