I have multiple villagers placed in a room to trade with and there are a few who won't connect to the beds. I can pick it up and put it back down and they still won't connect. I have even moved them and that one area will not connect with a villager. But can move the bed 6 blocks away and its just fine.
You need to destroy all beds, and then you must place the bed where you want your villager.