In War Without End, Sheridan jumps about 17 years into the future and meets an older version of Delenn in a cell on Centauri Prime. G'Kar is also on Centauri Prime at that time. How did Delenn and G'Kar end up there, and what does Delenn mean when she says that she accepted this fate a long time ago? I always speculated that G'Kar's presence is part of Londo's plan to free Delenn, but I have no evidence to back this up.
The Babylon 5 novel "Babylon 5: Legions of Fire – Out of the Darkness" (co-written by B5 writer J. Michael Straczynski) wraps up a lot of the missing plot points from the series.
I've borrowed heavily from Wikipedia for the following;
G'Kar is operating secretly on Centauri Prime, disguised as a Centauri using a changeling net. He collects intelligence about the Centauri military build-up and shares it with Sheridan and the alliance. During Durla's public speech attended by Londo, a disgruntled Centauri nobleman attempts to assassinate Durla and slightly injures Londo in the process. The assassin is stopped by G'Kar, whose identity is revealed. G'Kar is arrested but is given protection by Londo. G'Kar spends a year as Londo's "guest", but is not allowed to leave.
Meanwhile, on Minbar, during a birthday party for Sheridan and Delenn's son David, his parents give David an urn that Emperor Londo Mollari presented to them years earlier, in "Objects at Rest" of the TV series. Unbeknownst to them, the urn contains a Drakh keeper at the bottom. Later, when David is in his room alone, the keeper jumps out of the urn and attaches itself to David's shoulder.
Under the keeper's influence, David steals a ship and travels to Centauri Prime, where he is delivered into Durla's hands. Upon learning of this, Londo has a physical confrontation with Durla but is prevented from substantive action by his keeper. As revenge for Londo's outburst, Durla imprisons G'Kar and takes out his (synthetic) eye.
Attempting to rescue David, Sheridan and Delenn secretly travel to the Centauri Prime where they are apprehended by Durla, who intends to use their deaths to humiliate and demoralize the Alliance.
This series of events sets the stage for "War without End" with all the main characters in proximity to each other.