@DUBlady In order for the cheat to work, you need to have entered "testingcheatsenabled true" without quotes into the cheat console (crtl-shift-c to bring it up in-game). However, I would strongly advise against this, as it can completely ruin your game. When you delete a sim this way—a child, a pet, even an imaginary friend that has become animated—you only delete the "object," i.e. the body of that sim. Other data from the sim still remains in the game, and it can cause issues that may eventually make your save completely unplayable.
If you're having trouble aging up a child sim, I would recommend trying the other fixes in this thread instead. (It might be best to open the game and "save as" under a different name first, so you have a backup copy should things not go as you'd hoped.) For example, you can move the family out of its house and place it somewhere else in Edit Town; maybe bulldoze the original lot as well. Toggle aging off and on in options and move the custom age sliders around. Save, quit, and reload after this, playing for a couple of days to see if the sim can age going forward.
If you really need to get rid of that one child, your best option in the vanilla game is to create an adult, place him or her in the house, and then have that new adult and child move out to another lot while you stay with the rest of the family. (Or you could split the household in Edit Town.) This might solve the aging problem by itself. If the child sim still doesn't age after a couple of days, or you really just want her gone, you can go to Edit Town (while your original family is still active) and evict the child and your newly created adult from their house. If you don't place them anywhere else before returning to live mode, those two sims will become homeless and should disappear from your game sooner or later.