This sounds like a book I bought in a used-book shop somewhere around the year 2000. It was Stranger Suns by George Zebrowski.
At first, human scientists are exploring an old alien starship which apparently has been buried beneath the ice in Antarctica for a long time . . . until modern science unexpectedly found a way to detect its emissions. The starship is in the form of a sphere, over a mile in diameter, with lots of little passages and rooms inside, making it a three-dimensional maze if you don't already have a floor map. (Which, of course, the humans don't when they start exploring it.)
Later on, the main characters discover another one which is buried in the dirt somewhere in the Amazon rainforest of South America. (That would be the one you mentioned in your post.)
As explorations and analysis continue, it gradually becomes clear that the aliens, ages ago, had first learned how to build ships that could travel from one solar system to another very fast, and later had learned how to link things together so that you could step from one place to another without needing to fly a ship through the intervening space each time (similar to the "Stargate" concept in the TV shows), and then somewhere along the line the aliens had also learned how to move "sideways in time" from one parallel world to another, while staying in the same geographic location! Hence the opportunity to explore many parallel Earths. The aliens appear to be long gone, but their technology still works extremely well, once humans get the hang of it.
You also mentioned the idea that these doorways could be, and were, used to exile unwanted criminals. Frankly, I'd forgotten about that angle, but I found references to it just now when I looked. For instance, here's an excerpt from Chapter 32.
A growing city of white domes clustered around the ship, housing the
researchers who worked within the alien vessel, and providing holding
areas for the convicts who were being brought in for their one-way
trip away from Earth. A hundred at a time were instructed and
equipped, then taken down the corkscrew passage of the starship to the
frame chamber and herded through to a distant world, where other
rejects were already attempting to make a life for themselves.
The attraction of the scheme was that criminals could be removed from
highly visible penal institutions which did not rehabilitate and were
a costly problem to their communities; even better, no criminals need
ever be executed. Simply remove them forever from their past and
future victims. Make your lives elsewhere, the judges were saying, and
you'll feel the need for law.