The characterization of generalized Jordan centralizers on algebras