PHB pg 272, "When you use a melee attack or a ranged attack, you can target a square instead of an enemy".
If the teleport was contingent on a hit, then he couldn't do this, but as its an effect, I think he'd be able to. He'd look pretty stupid doing it, tho !
Party: "What the hell are you...