No. It applies to any offensive penalty that occurs in the end zone (defined by the spot of enforcement rules). Intentional grounding, for some reason, is separately specifically mentioned as having the safety penalty
Intentional grounding aside from distance penalized is also a "loss of down", i,e. unlike other penalties, you don't get the down over.