The RM15TR-C(71) caps are the ones that will fit the larger diameter threaded connectors on the GTOCP4 that the Y-cable and Encoder cable attach to. I checked the website and the internal thread specifications for the RM15TR-C(71) and RM15TR-C(31) are different (see below).
Be VERY careful if you try to screw the RM15TR-C(31) caps onto your GTOCP4 that you do not strip out the threads of the connectors. If they do not thread on very easily, don't try to force them. In fact, based on the drawings below I don't think I would try them at all. I measured the threads on my GTOCP4 and verified that they are M20 X 2 threads.
It is interesting that Mouser told you they are out of stock of the RM15TR-C(71) caps. I ordered three of them yesterday and they don't show to be backordered. I am on the Mouser web site now, and they are showing that they have 26 of the RM15TR-C(71) caps in stock. You can also try searching using the Mouser number 798-RM15TRDC71.
Here is the RM15TR-C(71) It has M20 X 2 internal threads. This is the correct cap for the connectors on the GTPCP4.
Here is the RM15TR-C(31). It has M19 X 1 internal threads: