Brooklyn judge finalizes sale of Long Island College Hospital