A judge has ruled that the Pentagon must give Alibaba a reprieve over its placement on a Chinese military list.