The best method was to remove teh placard from the fan. Then you cound unsolder the complete wire (with connector) from the original fan, and solder the complete wire (with connector in place) onto the new fan.
I don’t know where to source new connector. But I can’t imagine it can’t be found on AliExpress…