Try booting into Internet Recovery Mode using Command + Option + R to attempt to access the online macOS 10.13 High Sierra installer.
If you are able to access the online High Sierra installer, then you will likely need to use Fix #3 in the following article since Apple has broken that online installer:
https://mrmacintosh.com/how-to-fix-the-recovery-server-could-not-be-contacted-error-high-sierra-recovery-is-still-online-but-broken/
If you cannot access the High Sierra installer, then what are the exact errors you are getting when trying to reinstall Lion?
If you have changed the date & time to something other than the current date & time, then you will need to reset the date & time to the current date & time in order to access the online High Sierra installer.
If you have trouble with Internet Recovery Mode, then you may need to create & use a bootable macOS USB installer, but you will need access to another compatible working Mac. You generally need a Mac from 2007 to mid-2018 in order to create a bootable macOS USB installer for your 2011 Mac (macOS 10.11 or 10.13 depending on the model of the other Mac).
- macOS 10.13 -- a Mac Late-2009 to mid-2018
- macOS 10.11 -- a Mac 2007 to 2015
To confirm compatibility of the other Mac with a specific OS, you can use the information in the following article since the models I listed are just generalizations:
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility