You may want to contact Lionel. i believe they're pretty good about replacing these. They typically ask you to cut off the cord and send just the cord to them.
They then send out a replacement. Lionels phone and email can be found here: https://www.lionelsupport.com/ContactUs/
I have had good luck sending emails via the service/repair question link.