Get another external HDD of the same size or larger than your D: drive.
Drag and drop or copy and paste the files you want to keep to the new drive, then Format the D: drive.
After that, reverse the process and copy the files back to D: Keep the new external as a backup of D: