I thoiught current thinking was that Jupiter and Saturn formed pretty far out then were drawn in, swapping places with each other and collectively with Uranus and Nepture (and possibly ejecting a fifth large planet) going closer to the Sun than their present locations before finally settling down.
I think that was the idea before large numbers of Jupiter-sized exoplanets were found orbiting close to their parent stars. Then the new idea came up that Jupiter and Saturn may have formed close to the Sun. In a 3-body-problem manner, Saturn might have been pushed out and took Jupiter with it (similar in part to how our own moon is moving away from us). Then, with the space close to the Sun cleared of debris and pushed into clumps, Mars-sized protoplanets started to form and were pushed into orbits around the Sun. If the orbits were too close, because not entirely circular the differential pull of the Sun would have sped up or slowed down planets on the same orbits causing a collision. This may have occurred for Venus, knocking it so that it now has virtually no spin, for the Earth, giving us our current size and moon(s), and also to create the asteroid belt past Mars.
It all ties in with the bombardment phase when/where the inner planets received water, possibly from the motions of Jupiter away from the Sun pulling in the distant icy comets from the outer solar system towards the Sun. It's an interesting model where the actual reality might even be more intricate or different. However, this is a gap in our current understanding that we may begin to solve by analyzing Jupiter in detail.