What does the law say?
You can answer your own hypothetical scenario simply by reading the law.
But for the sake of discussion, “little girl” is not relevant.
“Little girl attacks them with a knife” is extremely relevant. A knife is a deadly weapon, and to attack someone with a knife is to place their life in immediate danger.
To simply wield a knife against someone in a threatening manner is assault with a deadly weapon, which is a serious felony.
What if the little girl in the grocery store had a gun and attacked three guys with it and they shot her?
Do they get off?
The fact that it was a little girl is absolutely a consideration.
Someone is beating on your front door at 3am. You respond with deadly force shooting through the front door and killing the person. Do the investigators treat you differently if you are:
a) 6’3” 240lb male
or
b) 5’2” 100lb female