Hi rhat! Welcome to Open Zeppelin. In the future please use proper code formatting by placing code between two ``` . Refer to How do I ask a good question?
The code piece you posted is the basic way of doing that and should work provided that your liquidity pool is set up correctly.
Are you sure that you have set up the LP Pair and have provided liquidity to it?