A medium sounding whining noise whenever I give it gas but quits when I let off. on 2001 Dodge Ram 1500

At any speed whenever I press the pedal to give it gas I hear a whining noise that sounds almost like the big tires you have on a 4WD truck that makes that noise when going down the road but my tires are not the real big ones but they are on 20" wheels but the noise starts when I give it gas and quits when I let off. Was told by a non mechanic who I bought the truck from that he thought it was a bad axle but he really didn't seem knowledgeable.