Hi Ayoub,
Please check the below article for pre-requisites and steps for configuring JWT. Securing APIs using JSON Web Token in API Gateway
If you are trying this on on-premise API Gateway you can also check the server logs for any additional information. Hope this helps.
Regards.