Let $x_1$ and $x_2$ be distances of centre of mass from the two bodies of masses $M$ and $m (M > m)$ respectively.
As $Mx_1 = mx_2 \:\:\:\:\: \therefore \:\: \frac{x_1}{x_2} = \frac{m}{M}$
$\because \:\: M > m $ or $m < M$
$\therefore \:\:\:\: \frac{x_1}{x_2} < 1 $ or $x_1 < x_2$
Thus, the centre of mass is closer to the heavier body.