By RAW, teleportation does not count as movement.
What counts as movement is implied in the Basic Rules in the section on Adventuring: Movement. Though not necessarily an exclusive enumeration of all possible forms of movement, this section details the following as forms of movement: walking, climbing, jumping, swimming, crawling, and marching. None of these fits the description of instantaneously appearing at another location, so by implication teleportation doesn't count as a form of movement.
In addition, no teleportation spell or feature mentions using one's speed or being limited by one's speed, whereas the Combat: Movement and Position rules explain that movement on your turn involves moving a distance up to your speed by walking, jumping, climbing, or swimming, deducting the distances cumulatively from your speed. Teleportation doesn't fit this description either.
Although there's no rule that explicitly states "teleportation isn't movement," the passages above make it clear that the RAW doesn't include teleportation as a kind of movement.
But it's almost certainly not intended.
By RAI, the point of the frightened condition is clear: if you're frightened, you're too afraid to willingly approach, close the distance with, or otherwise cause yourself to become closer to the source of your fear. The rules are written in simple language ("move closer to"), not technically less ambiguous but unnatural language ("cause yourself via your speed, teleportation, or any other means to become closer to"). That sort of language wouldn't aid comprehension. The rules are supposed to be read at face value, not as a legal document.
So it's pedantic to suggest that teleportation doesn't count, despite the RAW, and a DM could reasonably forbid getting closer to a source of fear via teleportation. I rule in this fashion at my table because the frightened creature in the narrative isn't the rules lawyer at the table; the player might be calm and collected enough to be picky, but the creature just wants to get away.
In the interests of a smooth and non-antagonistic experience at the table, it's probably best if everyone is on the same page with the DM before attempting anything clever. If you're the player, you'd probably better ask how the DM would rule before expecting that teleportation would work.