Jon had every intention to visit Casterly Rock and try to negotiate with Tommen's Regency. He was well aware that Lucion was sent only to check on the situation in his Court and that Cerenna was there to seduce him because neither of them had made any genuine attempt at negotiations. Jon didn't care about the Lannisters at all, but since the fight with House Targaryen looked inevitable, he might as well attempt to get some benefits from the lions first. Because of this, he aimed to avoid the Riverlands altogether, lest he meets Daenerys or her dragons by chance. That meant Jon had to either stick to the coastline or fly over the Iron Isles and enter the Westerlands by sea.