Dear Student,
Average density is the average of all densities calculated over multiple samples.
Mean density is usually used for inhomogeneous objects, for instance planets, liquids.
Here since the the object is inhomogeneous, small infinitesimally small packets of mass is considered.
P.S: Technically they portray the same meaning but by convention is used to describe different situations
Regards.