A group of environmentalists in Massachusetts plans to take legal action against the construction of offshore wind parks in state waters over concerns that they would pose a hazard to endangered species.