Insert locking piece with spring then slide cylinder in while holding the latch in.
Then it sounds like its not engaging the locking pawl all the way. Try tuning the key and seeing if the pawl slides in and out. If so then remove the key with it in the locked position (pawl in) .