Regardless how you get the new end (and a whole bag of them should be cheap), you will need to cut the ild one off, strip the outer insulation, then the insulation on the individual wires, and finally crimp them into the new plug end. This isn’t really difficult but you’ll need an appropriate wire stripper and an RJ45 crimp tool. That all assumes you have a few cm of spare cable to work with, of course.
This sounds pretty jury-rigged if it’s one continuous cable from end to end; normally you’d have the cable terminating in a wall receptacle. But it wouldn’t be the first setup like that. Just saying if you end up with one of those tools, might as well get things set up properly.
Best of luck on your layer zero networking project!