It should work but you may have to fab a transmission mount. Also, if the 5.7 is fuel injected you will need the computer and wiring harness to make it work. It may also require a change in the tail shaft on the trans or a different drive shaft.
It may be too narrow for the Grand Prix chassis. If you intend to remove the trunk and put in larger wheel wells for slicks or much larger tires then the rear should work in the car but it will take a lot of fabrication. Measure the two rear ends before doing anything. This will give you a good indication of what you will be up against.