In order to reach the 2 million Km mark in the game you will need to complete all requests in both the King's and RoboKing's Cosmos in all modes (the 6 Co-Op modes also count). This will make all planets available needed to push you over the required size.
Once all requests have been completed, the only stage this can be accomplish on is the Wake the King stage in the King's Cosmos. This is best done on Eternal Mode.
Play the stage as normal until you are large enough to reach the outer space portion. Instead of speeding around and picking everything up though, you will need to take your time and pick up all of the small items (stars, comets, space ships etc) and then working your way up from the smaller planets to the larger planets. Once you are able to pick up the King and the Black hole in the middle of the area you would be about 10 - 15,000 Km from your target. From this point just speed around picking up stars until you hit your mark.
If you are still shy just go back and replay some stages turning them to star dust until you have enough.
The trophy should pop as soon as you complete the stage and return back to the stage select area.
Hopefully this helps and have fun!