I am by far an expert at this stuff and I have never used this particular chip, but when I do an A to B comparison of Ports B and D the only difference seems to be PSP. Looking at page 153 of the datasheet it says that you need to set bit 4 of the PSPCON register to 0 to make it general IO. Did you do this? It may be that way by default. I would try PSPCON=%00000000.
Bookmarks