First of all, you've got the right to up to 52 weeks of maternity leave in both situations (old or new job).
What will be different is the maternity pay during your leave.
If you start a new job whilst being already 3 months' pregnant, you won't qualify for anything more than maternity allowance.
You have to compare what you will get if you stay in your current job to maternity allowance.
Staying at your current job will not only give you Statutory Maternity Pay, but you might also get an occupational maternity pay, depends on the policy of each employer, some are great, some are not much more than SMP.
If your current job doesn't not offer great occupational maternity pay (or you haven't been there long enough to qualify for it), then you just have to compare the Statutory pay with the maternity allowance.
https://www.gov.uk/maternity-allowance/what-youll-get
And this comparison depends on your salary.
How much higher is 90% of your weekly salary from £172.48?
For example, if you're paid £2000/month, 90% of that is £1800/month and therefore (£1800 * 12)/52= £415 per week.
(Now I'm not 100% sure about whether you take net or gross income for this calculation, maybe do it for both and see the difference but note that you won't have to pay tax when in maternity, as you'll be below the taxable income)
If you stay in your current job , you'll get SMP, and therefore £415 for the first 6 weeks and then £172 for the remaining 33 weeks.
If you go to the new job, you'll get maternity allowance, which is £172 for the first 6 weeks and again £172 for the remaining 33 weeks.
So all that you gain is 6 * (£415-172)= £1458, which is not nothing, but I think commuting 1h20 every day for ~5 months you'll probably spend most of that on fuel/fares and the tiredness in pregnancy is a real thing...
If you get paid much more than that (and maybe you can work from home some days), then it's a different story. Do the calculations and see what's best for you.
I changed jobs at 3 months pregnant, I've lost quite a bit of money on maternity pay but the new job is not only closer, but a job I like much more as well (and I'll be looking forward to return to after the maternity leave).