Hi PaulyG. I ave rebuilt a gearbox similar to yours. The Blue plastic circular piece ( Marked red and green ) is meant to thread into the top of the remote area of the gearbox. From past experience it can be easily cross threaded. Carefully clean the threads in the remote housing with maybe a rag catching any debris. The thread on the blue piece does not appear to be too badly damaged but clean them as well. Using a thin smear of grease try to thread the blue piece back onto the remote housing. It is difficult to get started without cross threading from memory. As Luddite mentions there is a circlip under roughly where your hand is holding the shift leaver in the top photo. That circlip retains a circular spring of increasing diameter, bigger at the blue circular plastic end. I can't remember whether it is easier to release the circlip before screwing into the remote housing. The blue piece needs to be screwed up tightly and then the lock tabs bent down to lock it in position.Hope this makes some sense.
Doug
from deep deep downunder.