How set and get var with Path?
withEnv doesn't persist environment variables.  Instead, you need to tell withEnv what steps to run with that environment by passing it a block.   Here is what I think you want your code to look like:

#!groovy

node('superhost01'){
  String HOSTNAME="host01"
  String USERNAME="tech_user"
  withEnv(['PATH=/data/jdbc_connector']) {
    stage('Prepare') {
      checkout scm
    }

    stage('Deploy') {
      sh """
      scp -r config.yaml ${USERNAME}@${HOSTNAME}:$PATH
      """
    }
  }
}


As a side note, I suspect you actually want to set PATH to /data/jdbc_connector:$PATH, otherwise your checkout step will not be able to find git and your deploy step will not be able to find scp.