I don't believe Amtrak or the NTSB said it was investigating a gunshot. They are investigating whether a projectile hit the windshield before the accident since 2 other trains had been hit by projectiles in that same area around the same time.
That area is known for having stones, bricks, etc thrown at the trains.
They have determined that, if a projectile was thrown/shot at the train, it was not a bullet.