You're not in wizard for the class abilities. You're there for the spells, especially the high level spells. You are a wizard first and necromancer a distant second.

Wizard 17 gets you wish so don't miss that. Then spell mastery for shield and mirror image might do more for your survival than a few levels of fighter. Then at 19 and 20, you are giving up a 6th and then 7th level spell slot, which are huge boosts in power.

So maybe a level of fighter now for armor would be worth it but there is a significant cost. I wouldn't go more than one level in fighter or rogue. Otherwise, make sure you're utilizing shield, absorb elements, mirror image, misty step, dimension door, contingency, and even the dodge action.