Chosen Solution
@dabeld you did not tell us why you replaced the other battery. I assume it is because it did not hold a charge as well. This could be caused by a bad charger and a bad cable. So you want to mnake sure that those two items are working okay. After that you will have to check the lightning port on your phone. Possibly replace that. If it still should not charge, than you may just have issues with the charging IC on the logic board. iPhones do not like after market chargers and a failed charging IC is the most common outcome from using those. Start with the simple things and work your way up. Oh yes, it is possible that you do have a bad battery. Check with ifixit and see if they are willing (most likely) to replace it. Use these guides to work on your phone.
I think we’re barking up the wrong tree so far. Put the old battery back on it temporarily, does it still charge correctly? defective iphone batteries don’t often not charge, damage to logic boards during battery replacement does cause batteries to not charge though. If the other battery still charges, you might have a bad battery but I don’t suspect you’ll find that. If the old battery also doesn’t charge, look very closely at the 11 very small components just to the right of the battery connector. If you can’t find 11, its because they’ve been knocked off in repair. A very common novice mistake.