Ranged championsheroes almost always have an advantage over melee, except if they are in melee range, so for the most part you have to sort of deal with it and try not to die. A few things that can help though are trying to last hit only when they have just used an auto attack or ability, and won't be able to punish you for moving into their range. Also, if you are 1v1, consider moving into melee range and dueling with them and getting them low enough they have to back off. This is easier if you have a gap closer, but also risky if they are able to kite back, are crowd control you in some way. If you are 1v2 as melee vs double ranged, then you will probably just have to play safe until a teammate comes and helps.