Kirzhnits Gradient Expansion for a D-dimensional Fermi Gas