https://docs.duet3d.com/en/User_manual/Troubleshooting/Parts gives you exact part numbers which should alleviate any doubt.

(Also I much prefer Molex KK over non latching connectors where cheap printer manufacturers resort to hot glue to make up for lack of latch)