Do other functions on the remote work on the TV?
If the remote you bought is the factory original remote then it may be time for a new TV.
If it's a "universal" remote it may not have all the functions of the original one.
You could try spraying contact cleaner into the input selector button on the TV. It may require you to get inside the TV and remove a board to access the switch. The switch may be sealed so can't be cleaned.