Taking up arms against the United States government is considered treason, and joining the armed forces of another nation is grounds for loss of citizenship. However, joining the French Foreign Legion does not seem to result in American members being stripped of their nationality. The Foreign Legion, inasmuch as it is a mercenary organisation and not the regular armed forces of a sovereign nation, seems to be the practical equivalent of ISIS, if not (obviously) its moral equivalent.
Granted, the Foreign Legion is not at war with the United States, but then neither is ISIS (neither is anybody, actually, officially. Congress has not declared war on any of the...what is it now, sixteen? countries we are currently engaging in hostilities against). Nothing illegal about an Ameican joining ISIS, unless one of their duties in their capacity as a member is threatening or harming an American citizen or government agent, or destroying American property.
EDIT perhaps the Foreign Legion wasn't the best example, because it is still part of the French Army, whereas ISIS isn't part of the armed forces of any recognized sovereign nation. With that in mind, maybe ISIS is more like Blackwater.