The men were part of a notorious group of Islamic State militants known as the “Beatles” because of their British accents.