Reindex 5.4.0 to 7.1.1

I figured it out. I had to remove the _type, but that still threw the exception. So i also had to be explicit about what i wanted to include.

POST _reindex?wait_for_completion=false
{
  "source": {
"remote": {
  "host": "http://training-es5.videotel-stage.com:9200"
},
"index": "cts-training",
"_source": {
  "include": [
    "key",
    "origin",
    "originKey",
    "generationDate",
    "who",
    "when",
    "where",
    "what",
    "verified"
    ]
},      
  "query": { "bool": {"must_not": [
{ "term": {
  "type": {
    "value": "training"
  }
}}
  ]}}
  },
  "dest": {
"index": "cts-training2"
  },
  "script": {
"source": """
  ctx._source.type = ctx._type;
  ctx._type = '_doc';
"""
  }
 }