Bulletproofs range proof of value provided from trusted third party
I think the example that you saw was just a simple example of how a range proof would work in theory.

Range proofs could be used for encrypting transactions in cryptocurrencies, specifically the amount of the transaction.

A very simplified mathematical notation would look like this:

$\text{E}(a) - \text{E}(b) = 0$

where $a$ is the amount of coins you "spend" and $b$ is the amount the receiver gets. $\text{E}$ indicates that the values are encrypted. This simple calculation here only indicates, that $a$ and $b$ are equal, so you didn't somehow create coins out of thin air.

Bulletproofs are a new addition to range proofs, they basically prove the same thing but bulletproofs can prove something with less overhead than a normal range proof, which again makes them desirable for cryptocurrencies. You can find more information in this PDF of the published paper.



Now to your actual question:

You can't really prove that your age is a certain number without a trusted party. Range proofs (and bulletproofs) just prove that the encrypted input is equal to the encrypted output.

You technically could do this with your government as you suggested. You would need to create a commitment. The commitment comes from anyone who is trusted by the verifier. So to prove your age, this value would have to come from a government issued ID.