I was playing Smogon Doubles and I had Jolteon With Volt Absorb and a Gyarados.When my opponent's Arcanine used Wild Charge on Gyarados,it hit him.I thought Volt Absorb was supposed to take the damage like Storm Drain Absorbs water type moves.
Nope, Volt Absorb only absorbs HP if the Pokemon targets the Pokemon with the ability, so it's normal that it hit Gyarados. The ability you're thinking of is Lightning Rod, which has the effect you described.
Source