You can now only make a claim for what is called New Style ESA, to do this you will need to have at least 50 weeks of NI Contributions during the two Tax Years 2016-17 and 2017-18.
If you do not have the Contributions then you will have to claim Universal Credit and ask to be assessed for Limited Capability for Work.