shrink the partition of D: from the start point to the right
Not from the right, but from the start of D: (left) to the right. So, the unallocated will be between the 2 partitions.
Note that this operation (changing the start sector of a partition) can be much more long than changing the end sector.
It is better to run defrag 1-2 times before proceeding. It can help to avoid errors in some cases.
Resizing the end from the right is for the c: partition
(all this, assuming that c: is located first on the hard drive and d: follows. If it is the inverse, of course, the operations will be else. The fact that a partition is named c: in the windows registry doesn't mean that is always the first of the drive.)
In case that D: is a logical partition, you need to resize the extended partition that contains it too. Extended partitions aren't named in the windows disk manager. GParted shows all with numbers.
*** It is highly recommended to backup any important files before doing resize/move operations. ***