Sit back and take a deep breath. Think logically and try to separate the charger wires from the troller. But before we launch head-long into this, are you certain you have two good batteries? Charge them and then have them load tested at your local auto store (usually free). If you are absolutely certain the batteries are good, then proceed as follows: (But if you are not certain - then save yourself grief and get help. Bad batteries need to be replaced or you will only chase your tail.)
1) One red wire and one black wire run from each battery to the troller plug up front. You MUST make sure the red and black wire from each battery are paired properly. You should find that they are either in a sheath or tied together so as not to confuse them. They may even be labeled.
2) The troller wires are the heavier gauge wires. The charger wires are the smaller wires.
3) Just like the troller wires, each battery is fed from the charger by a pair of wires (don't know what colors your charger has). And just like the troller wires, the positive and negative wire for bank #1 on the charger must go to one battery and the positive and negative for bank #2 on the charger go to the other battery.
4) If you paired up the positive and negative troller cables properly one pair connects to one battery and the other pair to the other.
It doesn't matter which battery you call #1 or #2 but you cannot put the negative wire that SHOULD go to battery #1 on battery #2 and the same applies to the red wires. Make sure you have them paired properly. If you cannot determine how to pair the wires, you need to remove the receptacle and look at the receptacle. They are typically marked A+ and A- (battery #1) and B+ and B- (battery #2). If you still can't figure it out you need an ohmmeter. You set the meter to OHMS and touch one probe on A+ and the other probe to one of the red wires at the battery (wires disconnected at the battery for this of course). If the meter shows continuity the red wire you touched is A+ and goes on battery #1 POSITIVE terminal. Now repeat the process for the A- terminal and one of the black wires. When you show continuity that wire goes on the NEGATIVE terminal of battery #1. Since you have the "A" (battery #1 side figured out, you now know the other red and black wire go on battery #2 (positive and negative respectively). Now would be a good time to label the wires so you don't have to go through this again nest year. Double check your charger wiring and check out the system.