Training Random Forest in XGBoost 4J Spark

How do I pass the num_parallel_tree param while training a random forest using XGBoost Spark 4J ?

    val hyperParams = Map(
       "booster" -> "gbtree",
        "objective" -> "binary:logistic", 
        "evalMetric" -> "logloss",
        "num_parallel_tree" -> 100)

    val xGBoostClassifier = new XGBoostClassifier(hyperParams)
      .setFeaturesCol(vectorAssembler.getOutputCol)
      .setLabelCol(labelColumnName)
      .setNumRound(1)

But the final model has only one tree. Looks like the num_parallel_tree parameter is not being used at all.
Even the logs of the XGBoost library which prints all the hyperparameters being used, doesn’t print the num_parallel_tree.

We are using the XGBoost version 1.0.0 with spark 2.4.2.