Hi Um,
You completely removed the LCD assembly before changing the battery?
A/ If not, you could have pulled on the cable and damaged it. The ear-speaker cable is one of the 3 cables connecting the screen assembly to the board on the top right of the phone;
B/ If yes, you could have reconnected it in a wrong manner. Try for example the front camera, is it working? The proximity sensor? If those 2 are fine, you could have an issue with either:
a/ your ear speaker itself
b/ or some issue on the board.
If I were you, I would try the following in this order:
1/ Connect your iPhone to iTunes, then hard-reboot it (hold home button + power button until phone restarts). If it does not work:
2/ Try if front camera AND proximity sensor are working (place a call, then cover the top of the screen with your hand. If the screen goes black, the proximity sensor is working fine).
2/a/ If cam and sensor are not working, then the connection between the screen assembly and the board is faulty. Try disconnecting then re-seating the cables of the screen assembly, then doing a hard re-boot while connected to iTunes. If issue remains for cam+sensor+ears-peaker, replace the whole sensor+camera flex cable. It is probably torn/damaged.
2/b/ If cam and sensor are working, try replacing the ear-speaker.
If issue remains, you could have an issue on the logic board itself. For example, there are components that you could have damaged while disconnecting and re-connecting the screen assembly. Or static electricity or a metallic object (screw driver, ring) causing a short on the board. Or coincidence! Etc. Good luck, let me know if anything of the above helps.