Typically a weak battery will not present as a free spinning starter that doesn't engage (sticky or bad Bendix)
That's why vehicles with even almost dead batteries still "try" to turn over the engine.
How could the parts store say it tests out fine even though the gear doesn't engage? Or did it engage on the bench test?
If it engaged on the test but not in the truck, then the more likely culprit is the flex plate is missing some teeth and the starter has nothing to catch. Bar the engine over a few degrees and try again to confirm or rule out that issue.
If it is the starter, no point in "repairing it" on a 20 year old truck. It's a cheap part that has pretty much lived it's life by now.