I'm not sure about chickens specifically, but as you can see above, all birds are part of the theropod clade, which is the same clade as T-Rex, so they are indeed closely related.
Convergent evolution tends to happen when animals face similar environmental challenges, because sometimes a certain body plan is simply the most efficient way to tackle these challenges. For example, if animal A and animal B both live in the water, and they both need to swim fast to fill their niche, they're likely going to evolve a similar streamlined body with dorsal and pectoral fins. Ex. Sharks, Dolphins and Ichthyosaurs.
My favorite example of how cladistics has changed our perception of animals is the elephant shrew.
We named it shrew because it's obviously a shrew, right? And the elephant part was just a funny little joke because of his big snout, even though it obviously isn't related to elephants! Well, it turns out that not only is it NOT a shrew, it is actually one of the closest living relatives to elephants! How crazy is that?
That is so cool! Are there any theories as to why elephants have grown so big when one of the closest relatives is so small?
Fun fact: I had to look up what a shrew is, since I'm not a native speaker. It turns out in my native tongue the name has mouse in it, despite shrews not being mice!
When i say they're one of the closest, it doesn't necessarily mean they're close, just that a lot of the other, more closely related ones, such as mammoths, are extinct. That said, the closest living relatives to elephants are actually manatees and dugongs.
These are still different animals that evolved to fill different niches though. They're part of the clade Afrotheria, which is very, very diverse.
For more information on why this is such a diverse clade, i'd recommend Clint's Reptiles' video about it: https://youtu.be/bO2DpSJtFBo
SUBSCRIBE