I need to replicate the effect used on the type here using After Effects (it's for a school project where we are not allowed to use any other program.)
How can I achieve this? Thank you in advance for your help.
You can use a displacement map.
Similar to how I explained to do so in Photoshop here ...you need to find an appropriate image (or video clip) to use for the displacement. Then use a Displacement Map effect with that clip as the source to create the distortion.
If you want a static effect then obviously you use a static image, or if you want the effect to be dynamic and move then you need to find an appropriate video clip to use...
I'll show you an example using this rippling water video clip:
Create your type:
Place your displacement source clip in your composition and hide it.
Add a Displacement Map effect to your type and set the "Displacement Map Layer" to the hidden clip. Adjust the horizontal/vertical displacement amount to your liking:
You should now have something like this:
Getting the right effect really hinges on you finding (or creating) an appropriate displacement map for your needs (I used the first clip I came across and spent about 2 minutes putting it together).