I'd hire a licensed electrician and have them de-energize the feed to the barn. They'd be knowledgeable about the right way to
terminate the wires. You don't want to do something unsafe and be responsible if there's a problem.