I could be mistaken, but after a quick 'net search, it looks like neither of those is correct. You need a 90915-YZZD1 aka 90915-YZZG1 according to this. However, I'm sure someone on here knows better.
90915-YZZD1 That is what you want for the exact one. I would take both filters up to your local Toyota and ask to look at a D1 filter. compare them if they are any smaller or larger you can technically use them just adjust the amount of oil you put in the vehicle for that oil change