Are you reasoning that the possible maximum penalty of "two years" means it is a criminal penalty or just equating detention in general as indicating a criminal penalty?

You might note that general detention is not indicative of "crime."  For example a judicial detention for "contempt of court" is not a crime.  As to the two year sentence that is a response to violation, "under title 18, United States Code," which is, as noted previously, a criminal US code and a separate category even if it is cited and applied to an immigration statute.  Even though the violation for repeated violations of immigration code may be punished similarly to a crime it does not change the statute from an infraction of immigration law to an infraction of criminal law or a "crime."