Do not even start this without solid backup.
Right-click the NTFS partition and select Move / Change Size Partition.
Drag free space after the slider to the far left.
This will move the NTFS partition to the end of the disk and free space in the area outlined below, between the APFS container and the NTFS partition. This should then consolidate vacant space.
Volumes of APFS containers are not displayed as filling of all free space, due to their function of "live expandability", even though the container itself does so. I do not have an example with APFS and NTFS to show, but this is my 1
So, to complete the changes, you must select APFS Container [not the Volume on it] and again use Move / Change size, change the new size until it fills the move Free Space.
Remember to use operations afterwards.
Note: This is probably a very long, slow operation; While it is possible much faster on the SSD [on which I have never actually tried to do a data move of this size] on HD, I expect to return to it in the morning, so make sure you have the time and keep your Mac on the mains.