An open box of baking soda will help eliminate "flavors" from your water. Works good in the freezer as well for ice cream.
Maybe the taste comes from your water line that is attached from the wall to the fridge. Usually they are plastic. This line runs into the fridge and comes out where you get the water from in the door. This could have mold in it which makes the water taste bad. Sorry, I don't know how to fix that. Maybe running bleach through the line.
I'd have the water lines cleaned out professionally. It would be worth not getting sick.