New Style JSA is based on NI contributions over a specific period and if it is correct that you do not meet the requirements, I think it will be the same rules for NS ESA.
So Theexwife is right, and you should be eligible for Universal Credit, very possibly with an extra element for being unfit for work. It is a means-tested benefit so will depend on your savings, and the savings/ income/ pension of your partner, if you have one, could make you ineligible.
You could complete the check on turn2us, but better still, try Citizens Advice for a full benefit check.
You may separately be eligible for PIP, which is not related to NI, nor is it means-tested. It is notoriously hard to get. Read up on what it entails, and do ask again and I will try to help as I have helped many claimants with the tricky claims process.