Nintendo does not sell official replacement AC power connectors (the proprietary rectangular plug) for the Nintendo 64. The console was discontinued in 2002; parts supply ended decades ago.
Never use a damaged cable (exposed wires, melted plastic). Never splice mains voltage without proper certification. A $20 new brick is cheaper than a house fire.