Bad Request, when trying to get Access token using JWT token

Hello Team,

I am trying to establish authorization between a web application (non OKTA) and spring boot resource server and followed the approach in below links, get bad request when trying to get access token from web application.

RSAPrivateKeySpec rsaKey = new RSAPrivateKeySpec(new BigInteger(1, Base64.getUrlDecoder()
                    new BigInteger(1,Base64.getUrlDecoder().decode("hAnA***GoQ")));
            KeyFactory factory = KeyFactory.getInstance("RSA");
            PrivateKey privateKey = factory.generatePrivate(rsaKey);
String jwt = Jwts.builder()
                    .setAudience(<Dev OKTA Custom Server>)
                    .setExpiration(Date.from(, ChronoUnit.MINUTES)))
// Rest call
            MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
            headers.set("Content-Type", "application/x-www-form-urlencoded");
            headers.set("Accept", "application/json");
MultiValueMap<String, String> body = new LinkedMultiValueMap<>();
            body.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer");
           body.set("grant_type", "client_credentials");
           body.set("client_assertion", jwt);
            body.set("scope", "");

HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity<>(body, headers);
            ResponseEntity<String> response =<OKTA Dev Custom Server Token URL>,HttpMethod.POST, entity, String.class);


kindly support and also correct me if my understanding is wrong.

Thank you

Any specific error message coming back from /token?

No, only receiving Bad Request Message.

is your request URL correct? Are you able to request different types of tokens using different oauth flows and clients?