Surround their spawning point with walls or cliff blocks while they are standing on it and keep adventuring!
wall/cliff block wall/cliff block wall/cliff block (These three blocks first)
wall/cliff block knight and knight spawn wall/cliff block
wall/cliff block wall/cliff block wall/cliff block
Also, keep a recall with you in case they get too close so that you will not die and lost your items.