This quote actually comes from an Iowa City Public Library speech in 2007. The Council on Foreign Relations has the contents of this speech on this website.
War Powers
It is precisely because the consequences of war – intended or
otherwise – can be so profound and complicated that our Founding
Fathers vested in Congress, not the President, the power to initiate
war, except to repel an imminent attack on the United States or its
citizens.
They reasoned that requiring the President to come to Congress first
would slow things down… allow for more careful decision making before
sending Americans to fight and die… and ensure broader public support.
The Founding Fathers were, as in most things, profoundly right.
That’s why I want to be very clear: if the President takes us to war
with Iran without Congressional approval, I will call for his
impeachment.
I do not say this lightly or to be provocative. I am dead serious. I
have chaired the Senate Judiciary Committee. I still teach
constitutional law. I’ve consulted with some of our leading
constitutional scholars. The Constitution is clear. And so am I.
I’m saying this now to put the administration on notice and hopefully
to deter the President from taking unilateral action in the last year
of his administration.
If war is warranted with a nation of 70 million people, it warrants
coming to Congress and the American people first.
What's clearly excluded from the first quote is that this was specific to Iran. Not that all of the same conditions (stated in the speech) aren't true with other targets of the Obama administration, but it is clear he was talking specifically about Iran.
He makes similar comments in this video,
"If you're going to impeach George Bush you better impeach Cheney first. Not a joke. [...] The president has no authority to unilaterally attack Iran and I want to make it clear. I want it on the record, and I want to make it clear. If he does as Chairmen of the Foreign Relations Committee and former chair of the Judicial Committee I will move to impeach him."
Here is a video with Biden on Chris Mathews where he defends the use of the term "impeach" regarding Iran. As the The Atlantic writes about this same question.
Chris Matthews: You said that if the United States had launched at
attack on Iran without Congressional approval, that would've been an
impeachable offense. Do you want to review that comment you made?
Joe Biden: Absolutely. I want to stand by that comment I made. The
reason I made the comment was as a warning. I don't say those things
lightly, Chris. you've known me for a long time. I was Chairman of the
Judiciary Committee for 17 years. I teach separation of powers in
Constitutional law. This is something I know. So I brought a group of
Constitutional scholars together to write a piece that I'm going to
deliver to the whole United States Senate pointing out that the
president HAS NO CONSTITUTIONAL AUTHORITY to take this country to war
against a country of 70 million people unless we're attacked or unless
there is proof that we are about to be attacked. And if he does, I
would move to impeach him. The House obviously has to do that, but I
would lead an effort to impeach him. The reason for my doing that --
and I don't say it lightly, I don't say it lightly.
So in essence, yes he did make this threat,
tldr; Biden originally made the claim specifically about Iran, but in defense of that comment he made it more principled about the president's constitutional authority and the punishment for unconstitutionally broadening that authority.