I know its been covered here a time or two, keywords are your enemy with searching effectively. But the wiring for the engine will be basically the same as whats covered in the ea-ej swap guides.
Your 99 is a phase 2 ej22, which limits parts interchange to 99-01 ej22's and phase 2 ej25s.
Look for an xt6 manual trans crossmember, will make mounting the transmission a breeze. You'll also have to switch over to 25 spline ea82 turbo axles if keeping stock hubs. There will be some custom work to the shifter I can't remember if it needs to be shortened or lengthened right off hand. The rear diff should be a non-issue, check the codes on the transmission, but it should be a 3.90:1 ratio which means keep your rear diff in place. Your driveshaft will need to be shortened ~2 inches if memory serves.
I know I'm missing some stuff, wait for Numbchux to chime in, he'll pick up where I've missed or where I'm mistaken