Solved it. Updated bitcoin core to the latest version, set the data directory to the same as my old version so I didn't have to redownload the blockchain, then cancelled the transaction with the abandon transaction function. Transaction sent and confirmed now.