Sadly, GM just doesn't build 'em like they used to... And they haven't for quite awhile, say about 10-15 years.
One common problem with the 5.7L Vortec you have is intake gasket failure. Some GM engines of that vintage were also known for what is called 'piston slap', where pistons were undersized and would literally 'rattle' or 'knock' inside the bores as they traveled up and down.
Transmissions are also a crap shoot with GM, and as stated earlier, have been for awhile. You don't state what you actually have, but a 1999 could be a 4L60E, 4L80E, possibly a 4L85E.
One common issue with late-model GM transmissions is that people assume Mercon-Dexron is okay to use in them, and that's not necessarily true of all models. Dexron has gone through a few evolutions, last I knew was Dexron V or VI, which is a pure synthetic and transmissions requiring it will have problems on regular Dexron, as they need additives not present in earlier formulas.
Unfortunately, the 1999 has enough computer controlled crap on it that it really cannot be swapped for anything else unless you shoot the moon and put a full mechanical setup in it, which is not wise, as it will drive the electronics controlling the rest of the vehicle nuts and cause other problems.
However, one common issue with the 5.7L Vortec that a surprising number of people are unaware of is the injection block failures. They are very common, and most people think they need a new engine when they just need a new injection block. These are called 'spiders' because they have plastic legs joining the injectors to the metering block, and the V8 models, they look like, well, a spider.
The plastic lines get brittle and crack over time, and cause fuel pressure issues that can cause any number of problems, including hard starts, black smoke, poor idle, poor fuel mileage, and generally poor driveability. The irony is, this is typically a $400-$800 job that can be done in a day. But if left unchecked, it can and will destroy your engine by diluting oil with unburned fuel. It can also lead to emissions problems.
And these Vortec setups are also known for fuel pump issues. They are like a diesel in that they are very picky about fuel pressure and will not run right if it does have the correct range of pressure.
Easy way to check this is to get a known good fuel pressure tester. Your pressure test port should be on the rear of the engine next to the distributor, and with a cutaway it is best to remove the engine cover and 'dogbox' for easy access. Pressure numbers on a good unit should show 62 psi priming (key on, engine off), and once the engine is running, it should show at least 58-60 psi idling, and should not fluctuate even when revved. These things are picky enough that they will not run right from 55 psi down. And I've heard of a few that flat would not even start with less than 50.
But don't condemn the spider on initial fuel pressure discrepancies. This can also be caused by a weak or bad fuel pump. I have seen them bleed pressure back through the pump into the tank, though much more quickly than a leak in the spider.
And just because it shows normal pressure on prime and idling does not mean it's not the problem. The system should also be tested for leakdown, which was my problem when I had a Safari van with one. System pressure will drop to about 58 on shutdown and should remain there regardless of elapsed time.
On that one, with the engine and related components warm, it didn't drop right away. It didn't even show a drop within 5-10 minutes. Two hours later, it had dropped to 40, bottoming out at 20 before another hour passed. With the system cold at 3 am, I reprimed it without starting the engine and I could watch the pressure drop on the gauge, 1-2 psi every other minute or so.
The symptoms displayed can be (but not limited to):
Black smoke from exhaust, especially on startup or acceleration
Spitting, sputtering, unevenness at idle
Hard start (excessive cranking)
Worse fuel economy than usual
Engine oil smells like fuel
The key indicators I observed were:
Hard starts that were helped by opening the throttle (you should never have to touch the throttle to start a fuel-injected engine)
Black smoke from tailpipe on startup
Uneven idle / spitting, sputtering that cleared on acceleration
Essentially, when these lines crack and leak fuel, they flood the intake, drowning the cylinders in fuel on startup. And because the injection spider is inside the intake manifold, the only way to know is to check the fuel pressure for static pressure, fluctuations and leakdown.
And this could be part of what's causing your transmission to act up. A flooding engine will bog and surge, which can confuse the transmission control software. A bad throttle position sensor can also cause this.
So if you have a check engine or service engine soon light on, check the codes. A P0420 indicates a catalyst problem, potentially an end result of this problem. Other codes that can indicate this would be Bank 1 or Bank 2 Rich Mixture / Too Rich, or Random Misfire / multiple cylinder misfire codes (generally P0300-310). An intake gasket failure might cause skipping / stuttering from coolant entering the cylinders, and could also cause a lean code on Bank 1 (left side) or Bank 2 (right side), even a specific cylinder misfire. The Vortec ignition distributor has also been known to wear or strip its drive gear and jump around, altering ignition timing.
Yours could have one or more of these issues. There could very well be nothing wrong with it that $1000 won't fix. Cheaper than a new engine and trans, and as much electronic control as there is on a 1999, it's cheaper to fix small problems before they cause big ones.
One more thought, there is a marine intake for the 5.7 used in Mercruiser and other boats that can physically replace the crappy plastic intake / spider setup, but some modifications are necessary. I doubt the injector wiring will mate up without modification, and the intake will have to be modified to accept an EGR valve. You could just ditch the EGR, block off the tubing and reflash the PCM to turn off the Check Engine light, but I don't recommend it. Bypassing emissions controls is often more trouble than it is worth.