Error upgrading to Scala 2.13.6 and Akka 2.6.16

Code

import akka.http.scaladsl.model.ContentType
import akka.http.scaladsl.model.HttpCharsets. `UTF-8`
import akka.http.scaladsl.model.MediaTypes.{ `application/json` , `application/xml` }

object MyPayloadType extends Enumeration {

val XML,
JSON = Value

def getMyPayloadType(contentType: Value): ContentType.NonBinary = contentType match {

case XML => ContentType(`application/xml`, `UTF-8`)

case JSON => ContentType(`application/json`)

}
}

Above code gives the following compilation error.
"Symbol ‘type Scala.collection.IndexedSeqOptimized’ is missing from the classpath.
This symbol is required by ‘class akka.util.ByteString’

Please suggest to resolve above.