Yep, endurance athletes peak in their early 30's
You lose the fast twitch, ultimate bit of power earlier[ie you can't jump out of the building anymore: look at video of Michael Jordan in his 20's vs 30's]. Endurance systems don't seem to show the same kind of decrement as early.
The relevant question is how much can you improve...and the answer is, you will never know until you dedicate yourself enough, follow a structured [and smart

] training program, and stick with it.
Period.
And yes, in one's 40's, the "ceiling" is dropping. That is, your maximal/theoretical/genetic limit is dropping.
BUT here is a little story: I was a steady, regular runner, including intervals, in my early 30's. Had [my final] knee surgery at 35.
Started riding bikes.
Started racing in 2 months [and I was S-L-O-W!!!]. Kept at it. Applied basic principles of training. Raced beginner vet. Started placing at times in my 2nd yr. Late in my 3rd season, moved up to sport [had just turned 38]. 4th season raced sport vet; won state titles in GA and NC. Tied for SC Vet state champ.
Moved up to expert [39 y/o] next season [5th]...got shelled! Not last, but mid-pack or worse. Almost dead last at 7Springs NCS race. At the end of the season, I hired Dave Morris and begin that journey.
Each year, my power output for particular intervals was increasing [advantage to training on the Computrainer]. By the time I'm 43-44, I am fast enough to virtually always win or place in Expert 40+; lap times are mid-pack for younger experts, back of pack semi-pros.
If I had been a competitive bicycle racer in my teens, and continued training hard into my 30's, I have no doubt I would have been stronger, and would have seen the decrease. But I didn't really see any decrease until 44-45, and honestly, I think it was as much motivation as anything. Dave and I were going to see how OLD guys responded to supplemental oxygen training...but I just lost the desire to hurt as much as I had been hurting over the years. I likely would have gotten even a bit stronger.
MORAL: stick with it! There is no way to know where you can get, or how fast you can be.
There is a guy in Atlanta [Greg Turner] that will be 50 y/o next year. There are not a lot of experts that want to race against him, particularly at longer distances! He IS slowing down a bit, but is still a monster.
Stick with it.