The order was intended to cut off U.S. investors from buying the stocks of 31 Chinese companies identified by the Defense Department in late August as being affiliated with China’s military.