Im not quite sure. It looks fine to me. I remade the trigger exactly as you did..though with less units for testing purpose.
Code:
Untitled Trigger 001
Events
Unit - A unit Gains a level
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Leveling Hero)) Equal to Paladin
Then - Actions
Player - Set the current research level of Iron Forged Swords to ((Current research level of Iron Forged Swords for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Leveling Hero)) Equal to Mountain King
Then - Actions
Player - Set the current research level of Black Gunpowder to ((Current research level of Black Gunpowder for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
Else - Actions
And it worked without a problem. You said in jasscraft..are you trying to take this trigger and put it into another map? If so thats probably the problem. If not, make sure that the units have the upgrade.