Unable to evaluate EL while creating Gatling scenario

I am creating scenario with repeat block. As I need index based request to be generated.

def scnWithLoop() = scenario("scenarioName").repeat(counter, "counter") {
    exec (session => {
    val index: Integer = Integer.getInteger(session.attributes.get("counter").get.toString());
    session.set("index", index)
    session
})

exec(
      http("scenarioName")
        .post(contextPath)
        .headers(headers)
        .body(StringBody(getData("${index}".toInt)))
        .check(status.in(expectedCodes))
    ).pause(20 seconds)
}

But this doesn’t evaluate EL ${index} and gives me error:

Caused by: java.lang.NumberFormatException: For input string: "${index}"

Gatling Version: 2.0.0-M3a

Appreciate any help!!!