The ages of Achan's children were not given. He hid the what he stole in his tent so his entire family was an accomplice to his sinful act. They hid his sin. We are warned to not quickly lay on hands and share in someone's sin.
1 Timothy 5:22
Do not be hasty in granting s’mikhah to anyone, and do not share in other people’s sins — keep yourself pure
Proverbs 29:24-26
The accomplice of a thief hates himself;
he hears himself put under oath but discloses nothing.
Ezekiel 18
18 The word of Adonai came to me saying: 2 “What do you mean by using this proverb in the land of Israel saying,
‘The fathers have eaten sour grapes,
so the children’s teeth are set on edge?’
3 As I live”—it is a declaration of Adonai—“you will never again use this proverb in Israel. 4 Behold, every living soul is Mine—the soul of father as well as the soul of son—both are Mine. Behold, the soul who sins is the one who will die.
5 “Suppose a man is just and does what is lawful and right: 6 He has not eaten at mountain shrines or lifted up his eyes to the idols of the house of Israel. He has not defiled his neighbor’s wife or come near to a woman during niddah. 7 He does not wrong anyone, returns his pledge for a debt, does not commit robbery, gives his bread to the hungry and covers the naked with a garment. 8 He does not loan with interest or take unjust gain. He keeps his hand from iniquity, executes true justice between people, 9 walks in My laws and keeps My statutes, behaving honestly. Such a person is just—he will surely live.” It is a declaration of Adonai.
10 “Now suppose he fathers a son who is violent, who sheds blood and does any of these things to a brother 11 (though the father himself does none of these things). He has even eaten at mountain shrines, defiled his neighbor’s wife, 12 wronged the poor and needy, taken by robbery, not restored the pledge, lifted up his eyes to the idols, committed abomination, 13 loaned with interest and taken unjust gain. Will he then live? He will not live! He has done all these detestable things. He will surely be put to death and his blood will be on him.
14 “Now behold, suppose he fathers a son who sees all his father’s sins that he committed, and observing, does not do likewise. 15 He does not eat at mountain shrines, or lift up his eyes to the idols of the house of Israel, or defile his neighbor’s wife, 16 nor does he wrong anyone, take pledged property or commit robbery, but he gives his bread to the hungry and covers the naked with a garment, 17 withholds his hand from mistreating the poor, does not take interest or increase, practices My laws and walks in My statutes—he will not die for the iniquity of his father, he will surely live.
18 “As for his father, because he cruelly oppressed, committed robbery from his brother and did what is not good among his people—behold, he will die for his iniquity. 19 Yet you say, ‘Why does the son not bear the iniquity of the father with him?’ When the son has done what is lawful and right, has kept all My statutes and has done them, he will surely live. 20 The soul that sins, he will die. The son will not bear the iniquity of the father with him, nor will the father bear the iniquity of the son with him. The righteousness of the righteous will be on him and the wickedness of the wicked will be on him. 21 But if the wicked turns from all his sins that he has committed, and keeps all My laws and does what is lawful and right, he will surely live, he will not die. 22 None of his transgressions that he committed will be remembered; because of his righteousness that he practiced, he will live.
23 “Do I delight at all in the death of the wicked?” It is a declaration of Adonai. “Rather, should he not return from his ways, and live? 24 But when the righteous turns away from his righteousness, and commits iniquity and does according to all the detestable acts that the wicked man does, will he live? None of his righteous deeds that he has done will be remembered; for his trespass that he trespassed and for his sin that he has sinned, for them he will die.
25 “Yet you say, ‘Adonai’s way is unfair!’ Hear now, house of Israel! Is My way not fair? Is it not your ways that are unfair? 26 When the righteous man turns away from his righteousness and commits iniquity, he will die for it; because of his iniquity that he did, he will die. 27 But when the wicked man turns away from his wickedness that he committed and does what is lawful and right, his soul will live. 28 Because he considers and turns away from all his transgressions that he committed, he will surely live, not die. 29 Yet the house of Israel says, ‘The way of Adonai is unfair!’ House of Israel, are My ways not fair? Is it not your ways that are unfair?
30 “Therefore I will judge you, house of Israel, each one according to his ways.” It is a declaration of Adonai. “Return, and turn away from all your transgressions, so they would not be a stumbling block of iniquity for you. 31 Cast off from you all your transgressions that you have committed. Make yourselves a new heart and a new spirit. Why will you die, house of Israel? 32 For I have no pleasure in the death of anyone who dies”—it is a declaration of Adonai—“so return, and live!”