Docusign JWT application access token fails when creating and sending envelop
Here are the things that you must ensure:

You have an Integration key (clientID) that is configured correctly.
You have an RSA Private key. that key was copied/pasted exactly as given to your configuration file. New lines must be preserved
Your URLs are matching the environment. Meaning you use account-d and demo.docusign.net for the sandbox env endpoints.
You need the userId which is a GUid for the user that would be impersonated. That user must consent to the application. You have to ensure you pass userId and not accountId and that it is for the same account that you would be using.

If you confirm all of this and still get an error - I would consider to use our code example to start. I don't see code in your question, but our code example should be a good way to start.
following docusign documentations I have written code to send and downloaded signed docs from docusign this was done using the OAuth token generator for development provided by docusign, now I am getting application token using api_client.request_jwt_application_token which hits /oauth/token end point, I am using the access_token provided by this to create and send envelop but I get the following error
errorCode": "USER_AUTHENTICATION_FAILED",\r\n  "message": "One or both of Username and Password are invalid. invalid_request
I've tried different solutions but so far nothing worked for me