Try this - go back to Windows Disk Management, click on the D: drive and select "Change Drive Letter and Paths". Remove (not change) the Drive letter (this "unmounts the drive). Then try to format.
What I would do is move C over to the left side of the drive to benefit from faster read speeds. To do this delete D, then choose Partition Wizard Resize Partition - Video Help, drag the partition and drag it intact all the way to the left, then adjust the right border to add any more space you want for C, click OK, Apply Step. It's safest to use the Partition Wizard CD burned to disk with Windows Image Burner, booted to do these operations which risk data loss.