I had the similar error experience. Not only a header comment required like stated here: https://learn.microsoft.com/en-gb/azure/databricks/notebooks/notebook-export-import
But when specifying the notebook path (in remote repository) while defining your task, make sure to omit the extension of the notebook file: .ipynb or .sql or whatever have you.