Wireless Body Area Networks (WBANs) are emerging in the livestock industry for remote monitoring of cattle using wireless body sensors (WBS). The random mobility of animals acting as nodes causes the network's topology to change rapidly, originating from scalability and reliability issues. Stable transmission of acquired data to the base station requires an intelligent clustering mechanism that reduces the energy consumption and fulfills the network's constraints. Several clustering techniques are available as a solution, but these techniques yield numerous cluster heads, resulting in more energy utilization. Higher energy utilization lessens the effective life of WBSs and increases monitoring costs. This paper presents a metaheuristic approach for selecting optimal clusters in WBANs to realize an energy-efficient routing protocol for livestock health and behavior monitoring. The proposed approach employs Ant Lion Optimizer (ALO) to select the optimal clusters for different pasturage sizes using sensors of different transmission ranges considering user's preferences about cluster density. The proposed technique with ALO is compared with other recent techniques such as Ant Colony Optimization, Grasshopper Optimization, and Moth Flame Optimization. The comparison results show the proposed technique's effectiveness in realizing energyefficient protocols of WBANs for remote monitoring applications.