Sounds like a permissions issue. It's almost certainly just Windows getting confused about permissions after an update or a weird shutdown. Since your C drive is fine and you want to avoid formatting, the good news is that your data is likely still there; Windows just isn't letting you "through the door" right now.
Try this, it usually does the trick:
- Open This PC, right-click on your D: drive, and select Properties.
- Go to the Security tab and click Advanced.
- Look for the Owner section at the top and click Change.
- In the box, type your current Windows username (or just type Everyone), click Check Names, and then click OK.
- Crucial: Check the box that says "Replace owner on subcontainers and objects" before clicking Apply.
If that doesn't work, go back to the Security tab, click Edit, then Add. Type in Authenticated Users and give them Full Control. I've seen cases where a Windows update tweaks security IDs, and adding this group acts like a master key.
Let me know if this works for you!