How to change retention duration for Azure Application Insights?

Sometimes the only answer is a no. In this case, you can't. From the docs:

Raw data points (that is, items that you can query in Analytics and inspect in Search) are kept for up to 90 days. If you need to keep data longer than that, you can use continuous export to copy it to a storage account. Aggregated data (that is, counts, averages and other statistical data that you see in Metric Explorer) are retained at a grain of 1 minute for 90 days.

I remember that a long time ago the pricing tier dictated the maximum retention period but it is now fixed to 90 days for all plans.

You can try give your feedback / ask for this feature here.