A big thing here, is that a realistic and 100% idea will never mix. You cant have both in real life. That being said, if we want to get as close to 100% as possible, the best option is to figure out what the difference is between teenagers/children and adults that is not arbitrary like age.
One idea, Almost by definition, is puberty and development. Until we are around 21 years old on average, we are still developing. It may be slower than when we were 13, but its there. There is a reason why the drinking age for alcohol in the USA is 21. The brain is still developing throughout all teen years, and even into their 20s for many people.
So, if we tie this virus to the brain, with fully developed brains being helpless, we will kill almost all adults, but leave a few 20 year olds, as well as kill a a bunch of older teenagers.
The hard part is what specifically it does, and how a brain that is not done developing could survive, but fully developed ones can not. This is where we get into unknowns. 238
One solid choice is that an undeveloped brain is more 'elastic', and so we could say that those brains can work around the virus. People can live without large parts of their brain. We could say that this virus affects critical functions, and a developed brain cant work around them fast enough, killing the adult. A child's brain on the other hand, with its elasticity, could theoretically work around the defects fast enough that they don't die. From there, the virus has killed off everyone it can, and those left behind are immune, and so it dies out forever, or keeps spreading to new born's, but cant kill them and so is harmless.
A realistic scenario here, the virus is rapidly spread over the course of a year by a malicious entity (perhaps fanatics who want to purge all humans). it takes 2-4 years to kill the person, but if your under the age of 16, you are likely to survive. After that, its harmless. You either die, or become immune to it, and no child under the age of 13 when infected will die from it, leaving the whole world dead or immune, with 99% of the population being under 18. 238