Hello, I'm seeing a T540P W540 W541 "Power Jack cable" available for less than 5 bucks (aliexpress, ebay, etc). The cable has the charging port and a connector that goes on the mobo so should be a pretty easy fix, no soldering.
Do you have the HMM (hardware maintenance manual) downloaded to double check?
Btw you don't need the whole "lenovo square tip" charger if you have a 20V capable USB C PD charger (65W or more), you can get a 3 bucks adapter, I use it all the time it works perfectly.
No I mean a USB C to Lenovo Square tip (the name of that Lenovo yellow plug) adapter, no USB A involved.
USB C PD charger > USB C - C cable > adapter > laptop. I've done this on many thinkpads, the only thing is if you use a small charger (45W or less) and have a big battery or the laptop uses a lot of watts, it might not charge or charge only when off. With 65W you're good, and with GaN tech they are tiny nowadays
This is also so you can also charge your phone tablet or anything else usb C while traveling with only one charger