To begin, 5 kilometers = 3.1 miles, not 4.61 miles (which would be about 7.4 kilometers). Anyway, three weeks gives you 21 days. I suggest using the Mountie method. Once you figure out what your actual distance goal is (5 kilometers/3 miles or 7.4 kilometers/4.61 miles), divide that by 21.
Let’s say you’re goal is actually 5 kilometers. That means you need to gain about ¼ of a kilometer per day to reach your goal on time. So on Day 1, walk/jog for ¼ km. Then on Day 2, run the first ¼ km and then walk/jog the second ¼ km. Keep adding ¼ km to the running portion each day, finishing with ¼ at a walking or jogging pace. Then on the day of the marathon, you can run the whole way.
If this feels too easy, feel free to increase the added distance to ½ of a kilometer instead of ¼. Never feel bad about running more, but definitely don’t let yourself do less than the minimum. And of course, don’t forget to warm up before you run and stretch after you run. Do not do any kind of static stretching before you run, though. Just do warm ups and dynamic stretches. You can find a pretty helpful guide for warming up here.
Good luck!