The ruling was a blow to the government of the U.S. territory, which is seeking to keep negotiations alive with creditors and restructure nearly $70 billion in public debt amid a string of multimillion-dollar defaults.