You are probably better off doing this with MOSFETs. There are two back to back because otherwise the body diode would cause flow from one battery to the other.

simulate this circuit – Schematic created using CircuitLab
You are probably better off doing this with MOSFETs. There are two back to back because otherwise the body diode would cause flow from one battery to the other.

simulate this circuit – Schematic created using CircuitLab