I think the UN part makes it a very different situation. He wasn’t really challenging the legitimacy of the president, but the orders.
It’s all about the legitimacy of the orders. In PFC New’s case the question revolved around the content of the order and whether or not his oath bound him to follow the order, and in MAJ Cook’s case the question is obviously whether or not the person giving the order has the legal authority to do so.