Sorting ring polymers by knot type with modulated nanochannels