In a simple harmonic motion

In simple harmonic motion mechanical energy is conserved as only conservative forces acts on the system. every time the loss in mechanical energy will be equal to the gain in kinetic energy and vice versa.

Energies are interchanging at the same rate, the average value over a period will be same

so the average potential energy in one-time period is equal to the average kinetic energy in this period.

Hence, option D is correct