Confusion about the description of the uncertainty principle

The first one is correct, the second is not.

The second definition1 is actually describing the observer effect. Explanations written by non-experts often mix the two up. But one key difference is that the observer effect only applies to situations where some external "probe" (like a particle) is interacting with the system. The uncertainty principle, on the other hand, applies even to a system which is isolated and not interacting with anything external.

1A couple other people have pointed out that these are not really definitions of anything, but I'll use that word for consistency with your question.

While other answers say the first one is correct, there is something that should be pointed out. The issue is with the beginning of your statement:

The first one is dependent on the wave function of the particle...

The Heisenberg Uncertainty Principle is very useful because it actually doesn't depend on the particular wave function. In other words, $\Delta x\Delta p\geq\hbar/2$ is true for all wave functions, not just sine waves.

There are more general uncertainty principles that do depend on the wave function, but those aren't as famous.

Another thing to keep in mind is that neither of your two statements define the uncertainty principle. Your first statement is the closest to being correct, but even then it's more of an application of it, not a definition.

Also, the uncertainty principle isn't a statement of how "sure" or "confident" we are about the position and momentum of a particle, which seems to be a common idea in both of your statements.

Before answering the question, I would first look at HUP from more technical standpoint:

The uncertainty principle is given by noncommutativity of measurement. When you have wave function $|\psi\rangle$ the measurement changes it to another wave function $|\alpha\rangle$ - this is the famous collapse of the wave function - and produces number $a$, for example component of momentum of the particle. The measurement can be represented as operator: $$\hat{O}_a: |\psi\rangle\rightarrow |\alpha\rangle,$$ where $|\alpha\rangle$ is now the state of the particle with definite value $a$. Before that, the particle could have been in superposition of states with several possible values of measured quantity, but once you measured it, you collapsed the wave function to that particular state. Because, now the particle is in the state of definite value $a$, succesive measurement will produce the same number $a$.

Now what if you decided to immediately after this measurement measure different quantity? Again you measure the value of $b$ and collapse the wave function to wave function of this particular state: $$\hat{O}_b: |\alpha\rangle\rightarrow |\beta\rangle.$$

The uncertainty principle follows from the fact, that measuring the quantity $a$ first and then the $b$ is not equivalent to doing it the other way around. That is: $$\hat{O}_b\hat{O}_a \neq \hat{O}_a\hat{O}_b $$

To show this would take some time, but intuitively this makes sense. If the particle could have definite value of quantity $a$ and $b$ at the same time, then measuring it should produce those two values. But since the values are already given, then it should not matter which you measure first. We know, however, it does and therefore the particle cannot be in state with definite value of $a$ and $b$ at the same time. These two values are simply incompatible. If the particle is in the state of definite value of $a$, then it must not be in state of definite value of $b$. The most notorious example of such quantities is position and momentum you wrote about.

This is however not really property of the wave function of the particle as such. It is property of the operators $\hat{O}_b$ and $\hat{O}_a$, i.e. property of the measurement itself. Every such operator/measurement has some wave functions associated with it, which are wave functions of definite values of the measured quantity. And this wave functions associated to the operators/measurement are simply incompatible.

Now to answer the question:

The first "definition" is taken from the point of view of wave function. It says that when you have wave function with definite value of position, then it is not function of definite value of momentum and vice versa.

The second "definition" is taken from the point of view of operators. It tells you that measurement of position changes the wave function in such a way, that it is now in the state of superposition of many momenta and there is no answer to which of the these momenta particle has and vice versa.

They are therefore equivalent. But note neither of your "definitions" is really a definition. They are more like different interpretations of HUP.