Jupiter did not physically travel to Earth. It is a planet located within our solar system, specifically the fifth planet from the Sun. Jupiter and Earth are both part of the same planetary system and have been in their respective positions for billions of years.
The formation of Jupiter, along with the other planets in our solar system, can be traced back to the early stages of the solar system's formation. Approximately 4.6 billion years ago, a giant molecular cloud collapsed under its own gravity, leading to the formation of a rotating disk of gas and dust known as the protoplanetary disk. Within this disk, small particles collided and gradually accumulated, forming larger bodies called planetesimals. Through further gravitational attraction and collisions, these planetesimals eventually grew into protoplanets, which further accreted matter and eventually became fully fledged planets.
Jupiter formed further away from the Sun than Earth did, in the region of the protoplanetary disk where the temperature was cooler. Its core began to accumulate gas and dust from the surrounding disk, gradually becoming a massive gas giant due to its strong gravitational pull. Over millions of years, Jupiter acquired its characteristic composition and size.
So, to clarify, Jupiter did not travel to Earth. It formed in its current position within our solar system as part of the natural processes of planet formation.