Quite often this is caused by burnt powder residue getting under the ejector star when ejecting empties. A good cleaning usually cures the problem. Cleaning the face of the cylinder may help also. .22 ammunition is very dirty.
Could be a couple of things. Check the rachets on the cylinder to make sure they are not damaged, also check the spacing between the cylinder and forcing cone. My gunsmith found that my 17-4's forcing cone was tilted, causing the cylinder to jam after the space became dirty from shooting about 25 rounds, therefore locking everything up. My gunsmith determined that this was a factory flaw and after a little filing the problem was solved for under $25.
here is a pic of my 17-4. Functions well now and I need to take it out to shoot it more often.