In order to make a farmer villager, first you need to make a composter from seven wooden slabs using the crafting table. Take out these wooden slabs from the chest box and put them in inventory then place them in a crafting table to make a composter. Add this composter back in inventory.
Now you need to find a village to get a villager. Find an unemployed villager and place a composter next to him. He will become a farmer this way.