There is not enough information to close in on a specific issue; I suppose the port forwarding you are asking about is the one on the NAT box, and not the SSH port forwarding feature.
If this is the case there may be at least two reasons for this behaviour; one is that box A and B have several IP addresses (say, box A is 10.1.1.50 and 192.168.0.50 and box B is 10.1.1.51 and 192.168.0.51) and the ssh connection from A to B happens on the one the ssh server on B is listening on, while the NAT box is only on the other network (the one on which the SSH server on B is not listening). This means that the SSH server on A is listening on both networks while the one on B is listening only on the network the NAT doesn't forward packets to.
The other reason may be a difference in accepted encryption/key exchange protocols, in which the SSH client on box E (external to the network, being used to test) accepts encryption protocol P1, SSH server on box A accepts protocols P1 and P2, SSH client on box A accepts protocols P1 and P2 and SSH server on box B accepts protocol P2 only. In this case I believe the error message sould be different from the one in the not-able-to-connect case, but again I don't know the software involved.
Please add more details to the question, such as addresses and software.