I actually thought this mission was one that would make me throw in the towel, but actually it is easier than it seems. You just need patience. I managed to win first time around.
It is important to get a good economy going as quickly as practical. I used my initial cash to build clerics, rangers, market, blacksmith and two towers. The towers were built north of the palace and the rest of the buildings to the south. Then I started to get frustrated...dragon came along killed a northern tower, came along later and destroyed the rangers. But I had a bit of an economy and was able to rebuild...slowly.
Then another pivotal moment came - a massive attack from the small dragons (wyvern?). But I survived just and rebuilt.
Build towers and magic towers and then dwarf towers - upgraded towers can mostly survive a dragon attack. As many as practical over time. Self supporting lines of fire if possible. They will get destroyed. Patiently rebuild them. Slowly branch out and destroy the lairs. Build some new guilds...wizards (gives you the towers), rogues, dwarves (more towers) and then the lord's tower.
Don't rush this scenario. Once you have a bit of stability with towers providing defense from the minions, start more aggressively addressing exploration, monster lairs and the missions.
The real secret comes when you have the economy to sustain your personal lightning spell. Every time the dragon attacks, wait for it to select a target and then hit it with lightning. The dragon will only hang around until its health hits a threshold. Either your towers or your lightning spell will accelerate this and then he will head to his lair for healing. So you can eventually survive 80-90% of all dragon attacks with nothing destroyed...just keep hurting him and sending him home.
At this point it is just a matter of time...bide it well. My top heroes were levels 20-23 when I finally attacked his lair and then him. I only had a single guild of rangers, warriors, rogues, wizards and clerics, as well as some lords. All town upgrades were max'ed out. I lost a few good heroes but he succumbed inevitably...almost an anticlimax.
Patience patience....defend...rebuild and rebuild and keep growing.