You've mixed up your units. I recommend always keeping the units in your calculations; if you drop them and just write the numbers you're liable to mess up units.
Your value for G is in units of kg m^3 / s^2. Your value for m1 is in units of kg. Your value for g is in units of m/s^2. But your value for r is in units of km. The units don't cancel out the way you want them to, since you've switched from using meters to using kilometers. Convert r to meters and redo the calculation, and you'll get the right answer.