The link @abcoathup is sharing has a detailed implementation reference that avoid these errors. The reason behind the error is clear on its description, there’s a type mismatch between variables.
For require(_token != address(0)), I’m guessing the problem is because _token is a variable of type ERC20, so it needs to be casted as an address with address(_token)
For wallet.transfer(…), the .transfer function is added to payable addresses, which are a special type of address. It can be casted as well with payable(wallet).transfer(…)