So basicly would you rather go in close combat with sword, axe, spear, knife etc, or more ranged combat, like muscets and shiie, or totaly crazy modern times where death can come from nowhere.
I'd definetly avoid WW1 lunacy (high casualties, easy to die).
Most likely I would pick medieval - open battles were not that common, mostly sieges, so you either hide inside the walls or camp outside the walls. And starve.
In WW2 I'd be in Bulgarian army, do absolutely nothing (commiting war crimes is optional) and when Soviets come surrender and switch sides at the very end of the war.
Modern easily, casualties are at an all time low, much higher chances of surviving, better medicine and above all at least you get supplied food on a regular basis.
And while death can come from everywhere, im sure its an easier death being blow up by a drone than it is getting hacked to bits by a peasant with an axe.