An Idaho man has been sentenced to 18 years in federal prison for attempting to support the Islamic State group.