Generalized sl(2) Gaudin algebra and corresponding Knizhnik-Zamolodchikov equation