When a model is immune to blasts that's the damage from the blast. The initial damage in the spread, the 5 points, would be applied to model A and then the blast damage (4 moderate) to the 4 other models.
So:
Yes, it's legal to range the blast that way. HOWEVER, A would have suffered the initial 5 damage to make it work.