Apparently the Rebel Alliance wanted to keep it a secret because the procedure has not been revealed in detail. It must have been a well-planned and successful ambush of some kind since nothing ominous can be seen in front of the Juggernaut(s), in either the movie or the graphic novel adaptation.
It's possible the Rebel agents tricked the transport(s) to stop pretending to be another prisoner pick-up. Maybe K-2SO played a role here. At least this was the first impression of the stormtroopers.
"I don't know. Must be another pick-up."
"I thought we had everybody."
Anyhow, the Juggernaut(s) were not stopped by force, but the Rebels initially used some sort of stealth tactics instead. The screen in the comic book shows there's no superficial damage on either one of the tanks.
Interestingly there were two turbo tanks in the graphic novel, as the movie gave an impression of there being only one. Given that, Jyn was most likely held in the first one, which means that the Rebels must have stopped and controlled them both.