Okay, so the scene you describe shows the girls on the pier in Dorne as the ships depart at the end of season 5.
And in the first episode of season 6, we see the ships arrive at King's Landing. Jaime reunites with Cersei, but Trystane stays on the ships, painting funeral stones for his dead fiance.
The girls then board the ship to attack him.
You're right, they don't show how the girls got from Dorne to King's Landing... but I don't see this as a continuity error. It hasn't introduced something impossible or unexplainable... they simply don't explain every detail. It's possible that the girls set out on another ship immediately following. It's also possible that they sped overland to reach King's Landing at roughly the same time -depending on the trade winds, going be sea between King's Landing and Dorne would probably take different amounts of time in each direction, and winds are very variable. But travel by sea is much more comfortable for nobility than travel by land (storms not withstanding), and often safer for a small party of nobility than going overland. So it's entirely possible, to me, that the girls traveled rough and traded many horses to go quickly overland to King's Landing.