If you are talking about bitbucket.org, meaning a Git repository hosting server you don't have a direct access/control to, you need to setup a webhook
That webhook will call the web listener of your choice, which can inspect the push JSON payload, and fetch the new commits into a local repo.
From there, you can make a diff, and check if a specific directory content has changed.
And yes, as commented, a Jenkins server (that you control) can be used as a webhook listener, with the JENKINS/Generic Webhook Trigger Plugin.
The OP Gaston K mentions in the comments:
I'm using bitbucket server, which is basically the same but running on my end, I guess.
Then, if you have access to the server, you can setup a post-receive hook: see "Atlassian / BitBucket / Using repository hooks".
You will use the Repository Hook Plugin Module, to define a hook of type "PostRepositoryHook
"
You can then, using the Atlassian SDK, code a class which implements that type:
public class NotificationPostRepositoryHook implements PostRepositoryHook<RepositoryHookRequest> {
(see for instance Creating a New Plugin from Scratch to get started)