Well, first
1. Take "Bear Form", "Metamorphosis", "Raven Form" and set those abilities so they have 0 sec normal duration and 1 sec~ hero duration with "alternate unit" as the dragon and "normal unit" as the ogre
Give the ogre all 3 of these spells and test if they work.
2. If the Ogre cannot have 3 transforming abilities (I'm not sure and my map editor is borked atm), then you will have to do this:
1. Take divine shield (unit form) and set its duration to 1, call this spell "Dragon Transformation"
2a) create two variables (OgreLife and OgreMana)
2b)
-
Events
-

A Unit Finishes Casting A Spell
-
Conditions
-

Ability Being Cast = Dragon Transformation
-
Actions -
-

Set Variable OgreLife to (Casting Unit)'s (Current Health %)
-

Set Variable OgreMana to (Casting Unit)'s (Current Mana %)
-

Create 1 (Dragon Unit) at position of (Casting Unit)
-

Set Last Created Unit's Life to (OgreLife %)
-

Set Last Created Unit's Mana to (OgreMana %)
-

Remove (Casting Unit)
This is very rough as I don't have a working editor on me at the moment, and I'd have to test it to make sure there aren't any errors, but that's the jist of it.
You'll also need to create a dummy ability called "Transform to Ogre" which does the same thing as the above, except switch the unit replaced with the Ogre.
You'll need to do this for each dragon form, though you'll only need to do "Transform to Ogre" once.
Optionally, you could move the Ogre to an inaccessable place on your map instead of replacing it, but I don't know if that's feasible or not.
The reason you should use divine shield as the dummy spell is because A) the unit is going to lose all the buffs it has anyway B) you don't want the ogre to die while casting the spell, creating a dragon after the Ogre's dead.
I suppose you could do this trigger without variables, too, since I'm not removing the ogre until the very end, however I think you can never go wrong using variables

. Also good practice for you since you're new to triggering.
Hope this is correct and helps.