I have modified this end cap to fit a 4 pin JST-SM connector, since this is what I had on hand. I will be completing my MPCNC build soon so I will post pictures then.
I have not yet tested this but it shouldn't have any problems. I have tested the mounting hole and confirmed the connectors will mount snugly. Everything else should be the same as the original.