Both are correct. It does not matter in this case.
However, there is a slight difference in meaning.
"to" implies you traveled there
"on" implies that you were standing on the planet. But if you...