'as much as' is speaking in terms of quantity, so John is just as good a friend to both people, as opposed to be more of a friend to another. 'As well as' just means John is a friend to both, it doesn't concern how much of a friend.
Does this make sense?