Check if you have frappe-bench/apps/erpnext directory
if its not there under apps then it means somehow ERPNext repository was not properly configured and downloaded onto your server.
You may manually remove erpnext from apps or using bench by uninstalling it from site and directory etc. (refer bench --help)
Now, you can initialize github repo using bench and get erpnext app.
Once you have ERPNext app downloaded onto server then you can install it on existing or new site using bench.
Thank you very much. I did what you said and now it is working good. I’ ll add what I exactly did below for future referance.
Firstly I moved frappe-bench/apps/erpnext directory to /root directory then,
bench get-app erpnext https://github.com/frappe/erpnext
bench --site erp.mysite.com reinstall
bench --site erp.mysite.com install-app erpnext
After that my erpnext app fixed. Lastly I removed /root/erpnext directory.