It's conditioning and probably too high a gear. Drop into a lower gear and (sorry) just force yourself to keep pedaling. It that's too tiring, try a still lower gear. Just moving your legs around in a circle takes strength and energy, much less making the bike go forward. And it specifically takes aerobic energy, make you breathe harder, but that's the whole idea! Bicycling is an aerobic sport which will improve your lungs, heart, and blood vessels.
An interesting aspect of bicycling is that it's really all about riding up hills. Sounds stupid, but that's how it is. So if you're coasting, you're obviously riding on the flat. Thus the easiest mental fix is to ride up hills. You'll have to pedal. Seriously. When I started riding again at 50, I set myself a goal of riding uphill to a local shopping center. Not that I wanted to shop, it was just a goal. Took me a whole summer to be get so I could ride the 7 miles and 500' of vertical to get there. I thought I'd have a lung up. But once I could do that, the world was my oyster. I could ride anywhere. Goals work.
__________________
Results matter