First, center the selector, which basically puts the ratchet mechanism in neutral. I like to put a small dab of grease on the underside of the disc to sort of glue it in place, it makes one less part to have to juggle as you are putting everything back together.
Next, put the retaining ring in the groove on the ratchet mechanism and squeeze the ends together with needle nosed pliers to compress the ring.
Then insert the ratchet mechanism into the head and make sure that the retaining ring is in the grooves in both the head and ratchet mechanism. Sometimes the ring can be kind of a tight fit and might take a little bit of wiggling, twisting, and pushing around to get it to go into place.
As long as the pictures post in the order that I intended, they should help explain.
The ratchet pictured is a Mac X3r, which is basically just a rebadged SK 45170. The internals are the same as your 40970, just larger.