What could be preventing my bicycle from shifting gears?
not sure if these may be the problem but you can get it checked. 


Make sure your cables are still in good condition. 
Make sure your hanger are not bend.
Make sure your derailleur is not bend as well. 


I have a mountain bike with 9 speed and it refuse to change to the largest cog and after taking it to the bike shop, we found out that the cables were too old and after replacing it and adjusting the tension, it worked out fine. Hope it helps.