Update the usage of metadata.json for getting LTS information (#16381)