@greatninja3 as always, science vs magic always depends on the relative advancement on either side. Guns are stronger than fireballs, yes, but illusion magic and charm magic, teleportation, earth magic to change the terrain, magic that changes the weather, even just a bright flash of light magic, etc, would be difficult to deal with even in modern times. People who downplay the power of magic always use "fireball" as the main example for some reason when it's not even close to being average among useful spells in battle. And if you use those spells effectively, you can create an advantageous battle arena with even one wizard in the fantasy army vs an army full of guns.
I'd say that, the term "magician" can refer to someone who can cast a magic missile once a day and maybe hit something if he's lucky, and it can also refer to someone who can casually destroy a city with a single spell. I guess, much like a "gun" can refer to a musket that's useless in the rain, breaks down easily, and takes a minute to reload... or it can refer to a spaceship's cannon.
In this setting specifically, idk, the main character seems pretty dumb with how he uses his magic, probably because the author has no imagination. For someone who doesn't want to kill, only using his magic for direct attacks is kinda... yeah... Couldn't he have that alchemist of his prepare the battleground in advance so that a single spell would turn it into quagmire, trapping the entire enemy army? Or he could use his mind-reading abilities to find and snipe them from the top leaders down so the assault loses momentum. Developing guns is not going to help him win with minimum casualties - anyone with any history knowledge would know that war death totals rose dramatically following the development of guns.
I think the best thing he could do for a no-death victory is have his alchemist develop a psychoactive drug - he could burn his world's equivalent of marijuana or poppy and use wind magic to carry the smoke to the enemy army. Capture everyone, imprison the leaders, offer the soldiers a chance to live as normal civilians after disarming them. It's not the smartest choice but it's probably the best "pacifist" option with a high chance of success the first time.