What is the relationship between aspect ratio and divergence speed?
Because the wing has less torsional stiffness for a given area. This lets lower torsion moments overpower the ability of the wing to resist that torsion.

The torsional stiffness is proportional to the skin thickness and the cross sectional area of the airfoil. For a given wing area and lifting potential, a higher aspect ratio will reduce that cross section, so less stiffness remains.

Divergence occurs when the increase in the aerodynamic torsion moment from the twisting of the wing is bigger than the increase in restoring moment from the wing's torsional stiffness. It does not help that a wider wing has more span to accumulate that twist, so the aerodynamic torsion moment on a high aspect ratio wing is high despite the smaller chord which helps to reduce that torsion moment. However, while chord length is inversely proportional to aspect ratio, the airfoil's cross section is inversely proportional to the square of aspect ratio, so the higher aspect ratio wing has a lower ratio of torsional stiffness to aerodynamic torsion moment.

Theoretically, an aero-isoclinic wing shows no torsion under bending and is supposed to have an infinite divergence speed. However, such a wing must do without ailerons or any other imperfections which might upset the fine balance that is required for its isoclinic nature. The linked report shows that the aero-isoclinic condition is not sufficient to prevent flutter or divergence.