Since the start of the war - or better, the birth of the State - there has been an outcry that Charedim serve in the army. In the Dati Leumi world the position is that this is a מלחמת מצוה as the Rambam defines it as עזרת ישראל מיד הצר - defending Jews from an enemy. [For lack of a מלך there might not be a proper Halachic "מלחמה" but "לא תעמוד על דם רעך" is certainly applicable.]
If they are correct [and in *this post* I take no position], then the obligation to serve is not only on Charedim - it is on every able bodied Jewish male on the planet.
Halachically, whether or not you live in Israel has zero bearing on whether you have to defend Jews against an enemy.