In 5e CR for monsters with casting ability isn't just determined by their caster level, but also by what spells they have at their disposal.

[Linked Image from i.postimg.cc]

Which is why a stock archmage is a CR 12, even though it's a caster level of 18.