Degeneracy of confined D‐dimensional harmonic oscillator