Originally, it meant war to save Islam. Only the prophet and his successors, which is what caliphe means in arabic, could call for it. And it is considered as the most guaranteed way to paradise. “Jihad fi sabil Allah” is the full expression and it translates to “struggle towards god”. Many caliphes called for it. What comes to mind is Saladin at the end of his reign, to remove the last remnants of the crusader states.
The last official call for jihad was by the last ottoman sultan in ww1.
The interpretation as an “internal struggle” came as an attempt to reform the concept of “jihad”, hoping to shift the mindset of muslims from external war against others, to internal war against sin. But it hasn’t succeeded, and since there isn’t any official reference for religious authority in islam, like what we have in the Pope as Catholics, any sheikh can just be his own reference and interpret “jihad” however he sees fit.
“Internal war” when it’s beneficial to appear peaceful, and “external war” when in a position of strength for example