In War Without an End (Season 3 ep. 16-17), Delenn says to John
That (17 years into the future, at Londo's court) they achieved all that they set out to achieve ... but the price, the terrible price.
What price was that?
The price was...
Dying at Z'ha'dum as seen in episodes 3-22 ("Z'ha'dum"), 4-2 ("Whatever Happened to Mr. Garibaldi?") and 5-22 ("Sleeping in Light")
Sheridan's death at Z'ha'dum (and the subsequent lack of longevity after Lorien breathes life back into him), the attack on Z'ha'dum meant that the Shadows' minions (such as the Drakh) fled the planet and looked elsewhere. The results of that were the Fall of Centauri Prime and the Alliance-members' war against the Centauri that's the background to most of season five. Countless lives were lost (mainly on the Centauri side) as a result of that, including Londo's.
What happened that wouldn't seem to be a terrible price to Delenn ;)
Sheriden's 20 years to live. Fall of Centauri Prime, such a war crime would weigh heavily on Delenn. Telepath Colony on B5 and subsequent Telepath war. Loss of Lennier. Drakk war. Death of Markus. Loss of Ivanova. The Shadow War, all of it. Mindbari civil war.
Pick any or all and you have a pretty steep price to Delenn for achieving a lasting peace.
@jfrankcarr's answer is essentially correct. Delenn is referring to John's now-limited lifespan. There is some more context to be had, however, and some of it is given from her perspective in the Legions of Fire trilogy of novels. Delenn and Sheridan are basically side characters in the story of Centauri Prime, but we get some insight into this moment.
Basically, the Delenn we see in the future of War Without End is much more focused on that countdown. The Delenn and Sheridan in the series' time have an Alliance to build and twenty years to spend together. The Delenn we see in the future has a bare few years left. David is growing into adulthood (and already getting into trouble), which John won't see. The Alliance is strong but complacent, and John won't be around to help shoulder the burden of getting things done. Finally, Delenn has a very very long life to look forward to, without John. She's trying to stay strong about all this, but it's not easy with the entire family in captivity on Centauri Prime and the idea of everything falling apart (the Drakh have made the Centauri into a credible threat to the Alliance).
Now, she's suddenly talking to a much younger version of Sheridan, and part of her is trying to be responsible and careful and not change time, and part of her is fighting that self-restraint and saying to hell with consequences. This is why she finally cracks and begs John not to go to Z'ha'dum when he's about to fade back to the present.