The ruling paves the way for the US military’s first execution since 1961 and its first by firing squad since World War II.