Swapping an '01-up (NB2) engine in a '99-00 (NB1) is about as simple as it gets.
The only real physical differences are the intake and exhaust manifolds, and the coils. Intake is considered superior on the NB1, so swap that over from the dead engine. Exhaust is superior on the NB2. You will need the EGR tube from the NB2, as they are different on the exhaust side, identical on the intake side. Midpipe fitment is identical, so the exhaust is a bolt-in.
NB1 coils have a reputation for failure, so try to get the coils/ harness with the NB2 engine. It's a simple job to wire them up, and they'll work fine with the NB1 ECU. You can get the connectors new if you can't get the harness. If you're stuck with the NB1 coils, they'll work, but the holes in the cam cover for the plug wires on the NB2 are smaller, so you will have to open them up, or shave the NB1 wires to fit.
Also swap the engine harness, injectors and fuel rail from the NB1. You'll also need to extend the cam position sensor wiring.
Otherwise, it's a mechanical bolt-in.
The VVT can be left disabled, and the engine will run fine. It will feel a little flat in the midrange, though it's probably making just as much as an NB1 engine, just pulls harder on top. You can pick up a VVT tuner or standalone ECU down the road and reap the benefits later. The VVT really wakes up the midrange, so it's worth it.
Otherwise, the NB1 ECU will run the NB2 engine just fine.
NB2 engines are cheaper and more plentiful, and have more potential, so it's really a no-brainer. I've done it twice, three times if you count putting an NB2 engine in my NA (which was a whole different story!).
Lot's of info on NB2 into NB1 on this page of my build thread: Rodan's Miata thread
There's a link to info on the coil wiring in one of the posts on that page.
Here's a link to the coil pigtails: NB2 coil pigtails