Insurer will pay $95 million, ending years-long legal fight over nonprofit’s surplus funds