After a Walk of Atonement interrupted, Tommen Baratheon has bizarrely decided to link up the crown and the faith in an unholy union. Since Jaime tried to intervene with the Lannister army, Tommen decided to shun him from King's Landing. So where is Tommen sending Jaime on Game of Thrones? He'll still lead an army on behalf of the king.
In a very weird move, Margaery and Tommen decide to spare her and her brother further pain and embarrassment by announcing a "holy alliance" between the crown and the faith. Jaime Lannister and Olenna Tyrell, who were on the verge of neutralizing the High Sparrow, are crushed.
"When you attack the faith, you attack the crown," Tommen says to his uncle after the announcement. "Anyone who attacks the crown is unfit to serve as Lord Commander of The King's Guard."
He adds, "You have served your house and your king faithfully for many years, and you will continue to do so. But not in this city."
You see, The Blackfish has taken Riverrun, wresting it back from Walder Frey's clutches. Frey wants it back, especially after the lengths he went to in order to secure it, but his army can't seize the castle on its own. Riverrun, remember, basically has an on-demand moat it can bust out at will to defend itself from attack.
Since Riverrun technically belongs to the Iron Throne, with Frey as its ruler, Tommen sends Jaime to head up the siege on it, but he's reluctant to go. Jaime would much rather stay behind and murder the flock of sparrows who have essentially brainwashed Tommen into doing their bidding. Plus, Cersei has a trial coming up and he doesn't wish to abandon her on a months' long mission.
Cersei reassures her brother that it will be a trial by combat and she has The Mountain protecting her. She'd also prefer him to be in his rightful position heading an army rather than the High Sparrow's prisoner in a dungeon, so she pushes him to go to Riverrun and "take that stupid little castle back because it's ours and because you can."
If anyone can dictate Jaime's actions, it's Cersei, so it seems like, for now at least, they'll be separated for the foreseeable future of Season 6.