iFixit has a very good guide for what to do with stolen batteries, which I will link [[What to do with a swollen battery|here|new_window=true]]. To give the spark notes of the article, battery swelling occurs when the chemical reaction that is used to generate battery power no longer completes perfectly. This causes outgassing, which results in the battery swelling.
You need to turn off the device and do not charge it. You need to carefully remove the swollen battery and dispose of it properly.
To answer your question your new battery should be ok if it has been handled properly and if it is a new battery.