The ruling is a legal setback for the pro-fossil fuel Trump administration, which moved to block the $5 billion Revolution Wind project.