How much better is the 22 on the knees from hard landings?
As CMC pointed out there will be a factor related to the tyre. For a given width and pressure a smaller wheel is actually less stiff than a bigger one, so a smaller wheel would be easier on the knees. But in reality you can usually run a bigger wheel at a slightly lower pressure and get the same kind of feel and rolling resistance so that probably puts it back to the big wheel (but it will be marginal).
Another more significant factor will be spoke length. If the spokes are all the same diameter, then the longer spokes of a bigger wheel will be less stiff in proportion to the length. So a 200mm spoke will be half as stiff as a 100mm spoke (ignoring minor factors due to bends etc). But the spoke is not the whole story, the bigger rim will sit nearer to flat so this will make it seem a little less stiff too. You will also have longer fork legs, which will be less stiff than short ones.
It will be hard to quantify with all these factors and all the possible different ways you could land, but since you already tried both 20" and 24" bikes I would just say it will feel about half way between those two
G.