PKIX path building failed when creating Salesforce JWT Connection

We’ve followed the steps listed here https://www.palantir.com/docs/foundry/available-connectors/salesforce#jwt-token to setup a salesforce connector, however we keep hitting this error:
Cannot conclude ssl handshake. Cause: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. (SQL state HY000)

We followed the steps to the dot, so unsure why it’s failing.

Do we need to remove the ------Start Certificate ------- and -----End Certificate------ from the self signed cert before encoding it with base 64?
Do we have to ssl sign the self signed cert?

We’ve been able to get the username and password method working, but it says it’s not recommended due to passing credentials back and forth, so would prefer to switch to the JWT method.