The issue may be where along the line the holder has failed. We have a bunch of these lights in our house and Iver the years I’ve had to replace quite a few of the holders as the transformer was fine as was the bulb - it was just the lamp holder that had failed.
Having said that, I think the majority fail where the bulb is inserted as sometimes messing about with exactly how the bulb was inserted would make the light work for a while. In which case you should be ok to simply cut the old one and connect the new one into the remains.