The spatial distribution of particles settles into a configuration which minimises potential energy. This is achieved when there is some regular structure - for example, hexagonal close packing. Gravitational potential energy is far too small on the scale of microscopic particles. The balance is between kinetic energy and electrostatic potential energy as defined by the Lennard-Jones potential.
Ideal gas particles are assumed to have no attraction at all, only "hard sphere" repulsion when they come into contact. The potential function for ideal gas interactions is therefore $U(r)=0$ for $r>2r_0$ and $U(r)=∞$ for $r≤2r_0$, where $r_0$ is the radius of particles so $2r_0$ (twice particle radius) is the minimum distance between the centres of particles.
2. The Nature of the Oscillations
These are not dynamic oscillations in the motion of particles (periodic variations with time), like a mass on a spring. So the question about over/under-damping is not relevant - although it is possible some analogy could be made with dynamic oscillations.
These are static oscillations in the distribution of inter-particle distances (oscillations in space), like the ripples of a wave function in quantum mechanics, or the ripples in sand on a beach.
$g(r)$ is a probability distribution function. The "oscillations" indicate that there are periodic values of particle separation which are more likely than average (peaks) or less likely than average (troughs). These "oscillations" are not necessarily sinusoidal (harmonic).
High density causes the "oscillations" by restricting the space which particles can move about in. When particles are forced close together they slide into relative positions where they can keep as much motion as possible - ie they form structures such as hexagonal close packing. At low densities particles have plenty of freedom to move about and can occupy all relative positions equally. All values of separation $r$ are equally likely - the probability distribution function is uniform, flat.
The oscillations are not necessarily sinusoidal. The graph you linked does look like a damped harmonic oscillation. But it is not an oscillation in time and space like a pendulum, it is a periodic variation in the probability of finding a particle at distance $r$ from an arbitrary particle. It is probably not easy to see it if you look at the particles. It is a statistical variation which shows up when you calculate average the distances, because averaging removes random variations.
The explanation you quoted suggests that the graph is statistical. It has been constructed by taking a snapshot of the jiggling particles, and measuring the distance of every particle from one aribitrary particle, which is chosen as the origin. (Perhaps this is repeated with every particle in turn being used as the origin. This is the same as measuring the distance between every pair of particles.) The distances of every particle from the origin are measured, and a histogram is plotted of the density of particles at a distance in the range $r−Δr$ to $r+Δr$ (vertical axis) vs r (horizontal axis).
For a gas you would expect a uniform density distribution.
For a 'cold' 3D cubic crystalline solid you find sharp peaks at separations r which are multiples of $1,\sqrt2, \sqrt3, 2, \sqrt5, \sqrt6, ...$ units. In fact for all $r^2=l^2+m^2+n^2$ with all possible combinations of integers $l, m, n$. In between are ranges in $r$ which have zero frequency - eg 1.25 units. These peaks and troughs extend over a large range in $r$ - ie there is long range order.
For a 'hot' crystal these peaks and the troughs in between them are broader and more rounded, like rolling hills and valleys, giving the impression of oscillations. (The unit of spacing also increases as the solid expands.)
For a liquid or amorphous solid there are peaks (and troughs) only at small values of r - ie there is short range order. At large values of r the distribution is more uniform like a gas.