That is a good question, and I just checked Wikipedia for modern population estimates. Census counts and non-census estimates tend to be from different years, so the data isn’t perfect, but perfect is the enemy of good and all that, and it is still interesting to look at.
2006 estimate for Nigeria was about 240M, and the 2019 estimate puts them at about 199M, or +59M in 13 years. For Indonesia there is a census count from 2010, ~238M, and a 2016 estimate of 261M, or +23M in 6 years.
Now for the United States: the 2010 census put the US at about 309M, and the 2018 estimate at about 327M or +18M over 8 years.
I think no matter who takes the #3 spot, the United States will be at #5 and maybe lower in my lifetime.