Don't try factory-resetting the TV yet, because if it's a software issue you could lose settings for nothing. First things first: go to the TV's network settings and check if there's a software update available. Sometimes the WiFi module needs an updated firmware to work properly. Also try "forgetting" the WiFi network on the TV and reconnecting from scratch, entering the password manually. Some LGs get stuck with corrupted connection data.
If that doesn't work, check whether the TV at least detects the WiFi network. If it's not showing up in the list of available networks, it's probably a module failure. If it sees it but won't connect or says "connected without internet," then it's more likely a software issue or IP assignment problem. Try changing the DNS connection type in the advanced network settings, use public DNS like Google's 8.8.8.8.
If none of this works and the TV still can't see the network, honestly the WiFi module is probably damaged. At two years old it shouldn't be broken like that, but it happens. In that case you'd have to send it in for repair or use an Ethernet adapter via USB if your TV supports it. Before you spend money, call LG's technical support and describe exactly what you're seeing in the settings - sometimes they have more specific tricks depending on the model.