In short, no. A 13900K isn't going to fit in any Intel Mac model. The 2017 iMac Pro had a Xeon-W with a LGA 2066 socket, and even the last Intel iMac (the 2020 with 10-series chips) had a LGA 1200 socket. The 13900K and 14900K are on LGA 1700.
Aside from the sockets, the chipsets also wouldn't be compatible. Intel typically swaps sockets/chipsets (in terms of compatibility) about every two "real" generations. The 14-series is really a refresh of 13-series (both use Z790 chipsets), and both are compatible with the same LGA 1700 socket with 12-series CPUs and the older Z690 chipset (needs a BIOS update).