I'm having a hard time getting the battery out of the battery charger.
The battery is stuck in the charger and I can't get it out.
この場合、次のような言い方ができますよ!
ーI'm having a hard time getting the battery out of the battery charger.
「バッテリーを[充電器](https://eikaiwa.dmm.com/uknow/questions/47638/)から取り外せないんだよね」
to get ... out of ~ で「…を〜から取り外す」
ーThe battery is stuck in the charger and I can't get it out.
「バッテリーが充電器につまって取れない」
to be stuck in ... で「…に引っかかる・詰まる」
ご参考まで!