I think that the D drive should be moved to right side (in your picture) by some amount, so that the free space will appear between C and D. Then the C drive can be extended.
Unfortunately, the Disk Management tool cannot perform such movement. There are several “Partition Management” tools that can be used:
The free versions should work.
Make sure to back up your important files.