Ants of any species, including large black carpenter ants, cannot kill trees because they do not eat wood like termites do. If a colony of black ants is living in a tree, it is because at least part of the tree is already dead.
Ants, including the carpenter variety, live in colonies. They send out scouts to find damp or decaying wood in which they can tunnel into and modify for the colony to live in.
It may appear as if the black ants were responsible for killing a tree just because they are found in it. The ants are not eating the wood but any sap, nectar in flowers, fruits or insects on the tree.
Sugary baits with insecticide must be placed near the tree to destroy a black ant colony and stop the insects from further weakening an already dying tree. Killing the ants individually will not help. With baits, ants bring the poison back to the colony.