If children and teens who do not know what haram is end up committing suicide, will they be forgiven by Allah and enter heaven?
Actually even if the child knows something about how bad is what he does it will not face him to punishment in the sense of tortures at his death, in Barzakh, in the Judgment day and in the Hereafter. By child here I mean before becoming Islamically mature, so the reason is obvious, there is no intellectual power so would be no task, the child is still innocent. However, any wrong behavior has its own natural side effects (الأثار التکوینی) which is inevitable, like someone who out of intention mistakenly runs before a bike and has his arm broken, he cannot say ow it was not justice it was only a mistake and now I should live like this for some months. Other examples are that a kid is learned by his parents to rob small things, the child is not a wrong doer in the sense of Islam's rules and penalties, but when the child grow nature should stop this (and probably try to compensate his past) and it will be difficult if it is now a habit, this being difficult is those natural side effects of those wrong behavior, being good would be more difficult to him.
In your example, the natural side effect is being died. It has been anyway out of curiosity or playing (e.g. being in the role of a movie star in a movie he has seen) or pretending like is older, and etc., it is not based on intellectual choice, is not intentional and the kid will be innocent and God Willing enter the Heaven.
And Allah and His Caliphs on Earth (peace be upon them) know better
If a person does something haram without knowing that Allah has forbidden it, they will not be held accountable.
Allah say in Surah al-Baqarah 2:286=
"Allah does not charge a soul except in its capacity. It will have what it has gained, and it will bear what it has earned. "Our Lord, do not impose blame upon us if we have forgotten or erred..."
And in Surah al-Ahzab 33:5=
"...And there is no sin on you if you make a mistake therein, except in regard to what your hearts deliberately intend. And Allah is Ever OftForgiving, Most Merciful."
Allah doesn't hold us accountable for things we don't know. We will be judged according to our abilities.
Are kids punished?
It was narrated from ‘Aa’ishah that the Prophet (peace and blessings of Allaah be upon him) said: “The Pen has been lifted from three: from the sleeping person until he wakes up, from the minor until he grows up, and from the insane person until he comes to his senses.” Narrated by Abu Dawood (4398), al-Nisaa’i (3432) and Ibn Maajah (2041); classed as saheeh by al-Albaani in Saheeh Abi Dawood.
I think the above Hadith is clear enough in explaining if kids are punished or not.
Are teens punished?
Assuming teens to have crossed their pubescence age.
Again using the same Hadith, if the teen was mentally challenged, No.
teens who do not know what haram is end up committing suicide
I think you meant to ask, "teens who do not know that Suicide is grave sin", then it depends entirely upon the creator. If conditional, the teen was a believer, then there are possibilities of that teen being saved and being forgiven by God. Else, if that teen was a polytheist, then I don't think there is any hope.
May the creator guide us all.