As mentioned in the guide I posted previously, you need to stop the Bitnami services first so the lego binary can bind the Apache 443 port for Let's Encrypt to validate the connection.
sudo /opt/bitnami/ctlscript.sh stop
Then, run the lego command, and once it finishes, start the services again with
sudo /opt/bitnami/ctlscript.sh start
You have all the required steps in our guide.