This can be done by implementing a custom grant type logic. the out of box OTK logic for urn:ietf:params:oauth:grant-type:jwt-bearer will always fail if the JWT is not a id_token generated by the gateway as the id_token validation fails to find the token in the token store.
To allow third party JWT to be used to issue new access tokens you would treat this as a custom grant type and add logic to validate the JWT. Even after the default JWT validation fails the policy continues verification against other grant types and it you configure your own custom grant_type it will try the custom grant type which you can configure to decode the JWT and validate the claims.
You can follow the process here Support Custom Grant Types - CA API Management OAuth Toolkit - 4.2 - CA Technologies Documentation
The best thing to do is create your own extension grant type for this but if your custom grant type logic looks for the same urn:ietf:params:oauth:grant-type:jwt-bearer grant type the custom logic will be executed if the OOB does not work.