The potential energy is given by:
if the ball is about to hit the ground this means that the height is zero; if we plug this in the equation above the result will be zero no matter its mass.
Therefore, the potential energy of the ball just before it hits the ground is zero joules.