Just some things I might do if it were my game.
1. Make that final Boss at CR24. In my experience, CR at higher levels gets odd and favors the PCs enough that you want to go +4 on an epic fight. Add in the fact that you have 5 PCs rather than 4 and I’d add another to the APL. A Black Great Wyrm Ravener is CR21 if I figure correctly, so either add some class levels or another template to bring that up.
2. Do not end the campaign with just your BBEG alone. Solo monsters against a group of 5 18th PCs will be done in 1, maybe 2 rounds. Action economy is against you.
3. With #2 in mind, I’d structure something like the following as the total complex defense.
a. Great Wyrm Black Dragon Ravener +, CR24
b. Lizardman Scion, CR19
c. Lizardman Sorcerer, Level 17, CR18, (This guy is dragonblooded, but at the cap of power that the dragon will allow, lest the sorcerer get ideas of being the bog ruler)
d. Lizardman Sorcerer Followers, CR14 (x5), these are the top disciples, equal to a CR19 encounter.
e. Lizardman Warriors, CR15 each (x10), these are the elite warriors guarding the king, equals a CR20 if they are all present at once.
f. Lizardman Druid, CR18. This guy is a wildcard. He’s there to support, but my abandon ship as he’s not too loyal to the dragon.
4. You’ll notice this combination is way beyond a level 18 party. However, these forces will be spread out, and if the party does a good job scouting, they should deplete these resources with a few tactical strikes. If they just stumble in and start swinging, well then we’ll see if that bard/barbarian combo breaks the scene.
5. The great well: The final lair is this chamber with an immense pool of water stretching hundreds of feet down. This is a huge underwater battle field where the dragon will retreat if his minions are destroyed. Make the party spend resources to fight here.
6. Add in some megalanias at the well. They’re just giant lizards, and won’t do much, except soak up damage if the PC’s think they are a threat, and you may as well put the dragons’ Charm Reptiles ability to use.
7. Someone on these boards wrote that the best way to play a dragon is as if it were just a sorcerer. Use the same tactics. Keep at a distance and blast. When the melee guys get full attacks, you’re in trouble.
8. With that said, this guy should have some scrying ability set on his minions. He should be watching the PCs in the early battles and may be familiar with some tactics before the final confrontation.