Yes it will work. You can check out some forums like 60degreev6.com for all kinds of info. You will need to keep your current style fuel injectors and fuel rail (specifically the fuel pressure regulator attached to it). This changed on the newer motors to a higher PSI and different style injectors which will not play nice on your ECM without being tuned for it. The block itself is identical and should have no issues bolting up. Same goes for the pulleys. They may be routed differently and you probably want to retain the stuff from the old engine.
I would try to keep as many of the sensors from the old engine as possible. If they functioned fine before then they are known to be good and work with your computer. A sensor that is out of whack but not quite far enough out of range to throw a trouble code is a nightmare to troubleshoot as it is, let alone if it happens when doing a heart transplant.
I believe the EGR mounting is different, but your OBD2 car uses the same style valve, so you should be able to use the EGR valve that comes with the new engine.
I don’t remember if there is an issue with the temperature sensor for that swap. I don’t think so, but many other swaps (Gen 2 > Gen 3, Gen 3 > 3500 LX9) have issues, so double check it to be safe. The parts interchange isn’t clear, but they might have moved to the smaller diameter sensor around '04-'05.
The cam senors also changed around this time depending on the model. They work but one has a pigtail and one has the plug right on the sensor. It’s hard to remove without breaking it, so swapping may be difficult. Rerouting the wires in the harness may be an easier solution.
I would recommend going for the swap vs getting another small port engine because you are more likely to find a lower mileage engine in a newer car, plus the large port is more efficient. Any way you go, I would strongly suggest getting a metal lower intake manifold gasket kit like the FEL-PRO MS98004T. I’ve seen many of these engines live a long life and die from coolant leaks. I always de-gunk the lifters while I have the intakes off. I have yet to pull one apart that didn’t have some/all lifters jammed.
Also, the heater core and A/C evaporator may be substantially easier to reach with the engine out, so you may want you consider doing that.
The large port 3100 is identical to the 3400 except the pistons and cylinder bore, so any 3400 swaps you see for cars with your engine would be the same stuff you would encounter, so you can search for that. Looks like your car was the first year of the W-body Century’s. W-body.com has threads of people working with this stuff.
I’m looking to swap my 3500 again to replace a blown 3400 in a 2005 Impala, so I will be brushing up on a lot of that stuff very soon. If you have any more questions, you can ask here or hit up the people on the two forums I mentioned above. They were pretty good communities when I hung around there last. Good luck!
EDIT - I found a post that goes over what one person experienced doing this swap:
As mentioned above, there may be some difference with sensors around '04 and up, so be extra vigilant if you get one of those engines. Also, your car probably has a ‘log’ rear exhaust manifold, and the newer ‘header’ style flows better. If it is from another W-body then it will fit but some other cars have the output offset by a couple of inches and won’t fit.