I've a 24 km commute in Dublin in Ireland. It's most consistent by ebike.
Driving can take anywhere from 35 minutes to over an hour depending on traffic.
Public transport takes 90 minutes and there is only a direct bus a couple of times a day, otherwise it will take closer to two hours.
On my bike it consistently takes an hour. I can take various green ways through parks and try to minimise my exposure to aggressive drivers and get some good exercise even on an ebike. The only issue is picking up a puncture which has been an issue with my new tyres lately. It's important to invest in good equipment if you can.