NPC’s are not restricted to the same spells the players use.
You can just say the NPC’s version of teleport allow them to exclude themselves. Chapter 10, Spellcasting, points out that there are far, far more spells than those listed in the existing books.
Uncounted thousands of spells have been created over the course of the multiverse’s history, and many of them are long forgotten. Some might yet lie recorded in crumbling spellbooks hidden in ancient ruins or trapped in the minds of dead gods. Or they might someday be reinvented by a character who has amassed enough power and wisdom to do so. (PHB, p. 201)
NPC’s are not restricted to the same spells as players; spells for players are created for balance and playability. It is entirely possible, if not expected, that an NPC might know a spell they players don’t or has a different version of the spell. Page 283 in the DMG has guidelines for creating new spells.
If you need the NPC to be able to teleport the players, they can. Whether it is by spell, boon, scroll, magic item, or a ritual requiring twelve apprentice mages and the alignment of the stars. You as the DM define the world.
You can make it subtle or obvious. From “Bob points a stick at you says a single word and you disappear” to “Bob the wizard and 5 of his apprentices form a circle around you and begin chanting for ten minutes” If your players try to identify the spell and succeed at their arcana check, you can say “Bob the wizard appears to be using a variant of the teleport spell”
If you’re worried about balance, put restrictions on it. Maybe the spell only works from a permanent glyph the NPC has spent months making (A reverse circle of teleportation so to speak). Maybe it requires 6 other people with spellcasting abilities and takes ten minutes to cast. Maybe it requires rare, hard-to-find material components that are consumed. Maybe it does not actually teleport them but fires them into the sky in a ball of energy that streaks to the target location in a matter of hours. You can even have fun with this by having the spell dump them high in the air and they then have to expend spells or resources to make it to the ground safely. You can even scare the players with Bob the wizard saying prior to launch: “Be careful I haven’t worked out all the bugs in this spell yet, landing can be a little wiggy”.