Yes. The person giving an unlawful order can be charged under military or civilian law. The person who follows an unlawful order can also be charged, as "just following orders" is generally not a valid legal defense for committing a crime.