From Tb3Ni2 to Tb3CoNi: The interplay between chemistry, structure, and magnetism