The gravitational potential energy depends on the position of the object, that is, the height. The higher an object is positioned, the greater its potential energy will be. This means that C has greater potential energy than D because its height is greater.
Therefore, the right answer is D.