If you add the dependencies as listed, they should still work - repositories keep the older versions, so projects built with a particular set of dependencies can pull those versions and build the same output no matter how old it is. Nothing has to update to a new version of a library - and many actively maintained projects will choose to stay on an older version of a dependency for lots of reasons!
That said, if you're creating a new project right now, some of the current Android framework libraries, plugins etc. might require certain versions of other dependencies - they might force you to meet some minimum version requirements, just because they're incompatible with older versions. You could either downgrade all the stuff that complains about needing a newer version of X, or you could upgrade your old dependencies, like you're asking about.
An easy way to do it is to open the Project Structure window in the File menu, and go to the Dependencies section. It'll show you all the dependencies in your project, identify which ones are out of date, and you can select an available version you want, or just update to the most recent version.
But if there is a compatibility issue, it might take some time to work out which versions are necessary, or even which versions are being pulled in by other libraries (e.g. a particular version of a library might internally have a dependency on a certain version of a library you're already using, and the most recent one is what your project ends up using). You can get some info about this from the output in the Build window, or maybe running the dependencies Gradle task if you want to explore that.
It wouldn't hurt to look at the project pages for your libraries and see what they say about installation and dependencies. Also, their method for adding them to a project might have changes, e.g. something that used the (now closed) JCenter repository might be using Jitpack now. Something to look at if you're having problems.
Also there's the issue that new versions of the libraries might have different APIs, or their behaviour might have changed. Even if fully updating everything goes smoothly, there might be stuff you need to fix in the code itself. Just a few things to keep in mind!