Have you ever downloaded El Capitan using your Apple ID? If you go to the App Store Purchases tab, does it show there. If not, that is most likely why you are getting that error. See if you can download it at the link below. You can make a bootable USB stick to install using this free program which will do all the work for you. Boot off that USB and do the reinstall.
Bootable USB Flash Drive – Diskmaker X oruse Apple’s method Create a bootable installer for OS
If it won't let you, then your only options are to upgrade to Sierra/High Sierra or find an older computer where you can download it using your Apple ID.