How long is maximum time to investigate an airplane crash?
According to ICAO, a preliminary report must be released after a year. There is no hard timeline for the full report:

What are a State’s reporting obligations during and after an aircraft accident investigation?
Under Annex 13 to the Chicago Convention, States in charge of an investigation must submit a Preliminary Report to ICAO within thirty days of the date of the accident, unless the Accident/Incident Data Report has been sent by that time. Preliminary Reports may be marked as confidential or remain public at the investigating State’s discretion.
The State conducting the investigation of an accident or incident shall also make the Final Report publicly available as soon as possible and, if possible, within twelve months.
If the report cannot be made publicly available within twelve months, the State conducting the investigation shall make an interim statement publicly available on each anniversary of the occurrence – detailing the progress of the investigation and any safety issues identified.

Keep in mind there is no established penalty for not complying with the above. Indeed in some cases (or countries) it can take up to a decade for a final report to be published.