First sign up to the Audax club £19. Then get along to as many 200km/300km and 400km rides as you can. I started from riding 30 miles every so often in Jan to riding 600km in June and 1200km in July. I did 10 x 200km rides and 1x 300km ride before the 600Km. I did the 600km including stops in 28hrs and 1 minute and most of this was solo and a hillish route. So 300 miles to London is quite flat and I’m guessing a biggish group, so 24hrs shouldn’t be a problem.
Make your you have a good saddle, stiff shoes and plenty of tape on your bars. Stay off the caffeine leading up to the event if you can, then you’ll get an extra boost on the day.
Edit: £240!!! I know it’s for charity but you could do a 600km audax for £25 quid and get people to sponsor you. This way more money would go to the charity of your choice.