A teenager has died after doctors misdiagnosed his terminal cancer as an ear infection.