Depending on if you want to keep the new version or not, what you want to do is as simple as either deleting or renaming the new version
mv /usr/local/bin/wget /usr/local/bin/wget_new
The new version got replaced because of the way the terminal determines which version to use. There is an environment variable called PATH. You can see its value with
echo $PATH. Basically its a list of paths(folders), and when you try to run
wget, it will run through that list and try to find the first one that has a exe by that name, and thats the one that gets run.
In your case I'm guessing PATH is something like
...:/usr/local/bin/:...:/usr/bin. Because of this, your new version is effectively hiding the old version of