Medium modification of averaged jet charge in heavy-ion collisions