I just spent an hour making one, the farmers aren’t farming. They are just running in circles. I took them from a nearby village. I swear if they dont work when they are near villages, I will delete my world.
I actually built one inside a village. There were two villages almost side by side. One was wiped out by zombies, so I built a breeder there and transported farmers from the neighboring village over to it.
I added some screenshots to show what's going on. Hopefully most are self explanatory. A few Iron Golems have spawned recenly as the 'undesired' villagers have not been crushed, eh, I mean retired.
Prowl has it right. Farmers won't farm if you take them away from a village, but less than 64 blocks. They will instead spend their time trying to pathfind back home.
I have an auto-farm and trading hall about 100 blocks from the village the farmers and traders all came from. When I bring villagers over, it takes a minute or two for them to disconnect from the village. For the farmers it means they spin around for a bit trying to get back home, and for the traders (locked in 1x1 cells) it usually means they go into love mode for a bit. I think their AI thinks they are still "in a village", but don't detect any other villagers from that village around, so they want to start making some. Eventually they assimilate into the Borg and they forget all about the village.