Have you tried reloading your last save and trying again?
For many scripted event like this that misfires, that will correct it.
You don't actually have to harm it at all, just get him to chase you to the back of the area, near the main door. Try hitting him again with Dragonrend after he lands, that almost always gets his attention and makes him come after me. Once he's in the right spot, the trap will drop on him.
This. Remember, Odahviing is essential to complete the main quest. If you could kill him (accidentally or otherwise,) you'd have completely ruined the main quest. It's easier to mark him as "essential" and have him unkillable, than to let the player kill him and create more scripting, voice-acting, modelling, etc.
Also... just because you can't kill him doesn't mean he can't kill you.