Yeah, DiskPart can only extend a partition into unallocated space that's directly next to it on the right side. So if your layout is basically:
[D:] [E:] [50GB Unallocated]
then D: still can't use that space, because E: is sitting in between.
Shrinking E: only creates free space after E:, not after D:. That's why the extend command fails even in DiskPart — it has the same limitation as Disk Management on basic disks.
You've basically got a realistic option if you want to keep the data:
Back up E:, delete the E: partition, extend D:, then recreate E:
Just make sure you back up anything important first. Moving partitions is usually safe, but if something interrupts the operation (power loss, crash, etc.), things can go bad pretty quickly.
Also check whether there's a Recovery/System partition between D: and E:. Sometimes that's the real thing blocking the extend operation, not the main partition itself.