Found out that these where all correct statements NOT causing the deprecated warnings. These statements below are the culprit with the fixes in them.
var String[] results = speedtestCliOutput.split("\\r?\\n")
// var float ping = new java.lang.Float(results.get(0).split(" ").get(1))
// var float down = new java.lang.Float(results.get(1).split(" ").get(1))
// var float up = new java.lang.Float(results.get(2).split(" ").get(1))
var float ping = Float.valueOf(results.get(0).split(" ").get(1))
var float down = Float.valueOf(results.get(1).split(" ").get(1))
var float up = Float.valueOf(results.get(2).split(" ").get(1))