Is (1) correct, or must it be written as (2)?
- John told me yesterday that this contract will not be renewed when it ends next month.
- John told me yesterday that this contract would not be renewed. It would be ending next month.
2 is not correct, but can be corrected; 1 is correct but can be made more parallel to 2:
1a. John told me yesterday that this contract will not be renewed when it ends next month.
First let me explain why 2 in its original form (a) is not correct but the conjoined form (b) is. This is perhaps surprising as we normally think of conjunction of sentences as not changing the meaning, but in fact this is not a conjunction of sentences but a conjunction of clauses and brings the "next month" clause into the scope of "John told me". The would is commonly used for statements that are conditioned on something else, classically a main clause in the subjunctive expressing a (currently) counterfactual statement (or hope). But would as the past tense of will when moved into the scope of a verb of saying in the past, it can move into the past tense as well.
1b and 2b are both correct but 2b is more usual, while 2a is more emphatic. Given today is after "yesterday" and before "next month", will can be used. For me it has a strong feeling of emphasis, and some feeling that it is John's decision.
So if John is the one with the pursestrings who decided the contract will not be used, and he is revealing his quite emphatic will about that, you would relay that do the rest of the team using "will" to retain that emphasis that this is John's will. Of course he could be relaying someone else's definiteness that there is no way it will continue.
But if John is relaying bad news without any particular emphasis, it would be usual to put all the verbs into the time they were originally said, moving them a step into the past in this case.
Contrast with the following
1c* John told me a month ago that this contract will not be renewed, and will be ending at the end of last month.
1b has faulty tenses because the contract has already ended, in the past, so must be expressed in the past.