You have said that you have a stronger duty to save the child because he is right in front of you. You think distance matters morally.
But suppose that you are on holiday abroad and you are asked for money to help the orphanage next door. Is it morally wrong to refuse to give your holiday spending money to help?
If you think that it’s not morally wrong to hold on to your spending money, then it looks like you think that distance doesn’t make a moral difference after all. So, if you’re required to save the drowning child, it can’t be because of distance – some other factor must make the difference.
Or perhaps you think that it is morally wrong to hold on to your spending money - you are required to help the orphans, just because they are next door. But can it really be that you avoid obligations to help the needy just by keeping your distance from them?