This question already has an answer here:
I intend to base my story on a habitable earth-like planet, which faces major apocalypse that forces it to be a moon of super jupiter and tidally locks itself. If this is to happen, how would it be possible scientifically?
EDIT: Let us assume the planet to be moved is our Earth orbiting in Mars' orbit and it is to be incorporated in Jupiter's orbit as its moon. Could this scenario be possible theoratically?
Also suggest the changes to be made to the mass of sun, earth, and jupiter, and distance with respect to each other so that such a merger can happen with minimum impact on the habitability of earth so that it could support complex life forms orbiting around the gas giant.